MrSet Posted May 27, 2018 Share Posted May 27, 2018 (edited) Hello. I have a website in which i recently installed friendly urls. Everything works fine besides product quick view opening modal and ebay module modal. It is ajax requests which return 404. http://test.magisterhyd.com/en/. Without friendly urls it gets 200 and opens modal. Help me please!!! Probably trouble is with my nginx config: server { # Ipv4 listen 80; client_max_body_size 64m; index index.php index.html index.htm; server_name test.magisterhyd.com; root /srv/public_html; # Your admin folder set $admin_dir /admin123; # Gzip Settings, convert all types. gzip on; gzip_vary on; gzip_proxied any; # Can be enhance to 5, but it can slow you server # gzip_comp_level 5; # gzip_min_length 256; gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; # Supposed to be the case but we never know # text/html; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; #REWRITE_MOD rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last; rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$1$2$3.jpg last; rewrite ^/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last; rewrite ^/([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg last; rewrite ^/c/([0-9]+)(-[.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+.jpg$ /img/c/$1$2$3.jpg last; rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+.jpg$ /img/c/$1$2.jpg last; rewrite ^/images_ie/?([^/]+).(jpe?g|png|gif)$ /js/jquery/plugins/fancybox/images/$1.$2 last; rewrite ^/order$ /index.php?controller=order last; # Redirect needed to "hide" index.php location / { if (!-e $request_filename) { rewrite ^/.*$ /index.php last; } } error_page 404 /index.php?controller=404; # Static assets delivery optimisations add_header Strict-Transport-Security max-age=31536000; # Cloudflare / Max CDN fix location ~* \.(eot|otf|ttf|woff|woff2)$ { add_header Access-Control-Allow-Origin *; } location ~* \.(css|js|docx|zip|pptx|swf|txt|jpg|jpeg|png|gif|swf|webp|flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac)$ { expires max; log_not_found off; add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; } # Deny access to .htaccess .DS_Store .htpasswd etc location ~ /\. { deny all; } # PHP 7.1 FPM part location ~ [^/]\.php(/|$) { fastcgi_keep_conn on; include /etc/nginx/snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.1-fpm.sock; } # Allow access to robots.txt but disable logging every access location = /robots.txt { auth_basic off; allow all; log_not_found off; access_log off; } # Prevent injection of php files in directories a user can upload stuff location /upload { location ~ \.php$ { deny all; } } location /img { location ~ \.php$ { deny all;} } # Ban access to source code directories location ~ ^/(app|bin|cache|classes|config|controllers|docs|localization|override|src|tests|tools|translations|travis-scripts|vendor)/ { deny all; } # Banned file types location ~ \.(htaccess|yml|log|twig|sass|git|tpl)$ { deny all; } } Edited May 28, 2018 by MrSet (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now