Answer the question
In order to leave comments, you need to log in
How to configure the nginx and php-fpm bundle to be compatible with the Opencart Custom Product Designer 3.0.0 module?
The problem is that when following a link like ".../tshirtecommerce/admin/index.php/user/login" we get 404 errors. A link like ".../tshirtecommerce/admin/index.php" works fine. When examining the nginx logs, it turned out that nginx cannot find the ".../tshirtecommerce/admin/index.php/user/login" folder, which is what it writes about. The internal logic of the script is unknown, since there is no ".../tshirtecommerce/admin/user/login" folder in the system either, but this does not prevent this module from working perfectly in a local Denver that works on Apache.
I hope they help me here, thanks! !!
server {
listen 80;
#listen 443 ssl;
#ssl on;
#ssl_certificate /etc/nginx/server.crt;
#ssl_certificate_key /etc/nginx/server.key;
server_name www.site.com site.com;
access_log /var/log/nginx/site.access.log;
error_log /var/log/nginx/site.error.log;
charset utf8;
index index.php;
root /home/user/data/www/site.com/;
limit_conn perip 20;
limit_conn perserver 150;
location / {
server_tokens off;
client_max_body_size 10m;
client_body_buffer_size 128k;
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block;";
if ($request_method !~ ^(GET|HEAD|POST)$ ) {
return 444;
}
if ( $http_user_agent ~* (nmap|nikto|wikto|sf|sqlmap|bsqlbf|w3af|acunetix|havij|appscan) ) {
return 403;
}
if ($http_user_agent ~* LWP::Simple|BBBike|wget|curl|msnbot|scrapbot)
{ return 403;
}
try_files $uri @opencart;
}
location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; }
location ~ /\.ht { deny all; }
location ~* (\.(tpl|ini))$ { deny all; }
if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; }
location /admin {
index index.php;
}
location /tshirtecommerce/ {
index index.php;
allow all;
}
location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ {
add_header Pragma "public";
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
access_log off;
log_not_found off;
expires 90d;
}
location ~* .(jpg|jpeg|gif|css|png)$ {
access_log off;
expires 10d;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/user/data/www/site.com$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 128k;
fastcgi_read_timeout 300;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param DOCUMENT_ROOT /home/user/data/www/site.com;
}
location /phpmyadmin/ {
root /usr/share/;
index index.php;
}
location ~ /\.ht {
deny all;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question