Hi Support,
I installed nginx reverse proxy in my server. All are working are working well expect redirection to .html pages.
MY site is magento and test.com/default is working but test.com/default/test.hml getting 404 nginx error.
Please advice.
My configuration:
/etc/nginx/sites-enabled/default.inc:
location / {
#try_files $uri $uri/ /index.php;
try_files $uri $uri/ /index.php?q=$request_uri;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
break;
}
location ~ \.(jpg|jpeg|png|gif|swf|ico|js|css|txt|htm|html|xml|bmp|pdf|doc|docx|ppt|pptx|zip)$ {
expires 30d;
break;
}
location ~ \.php$ {
access_log off;
proxy_pass http://127.0.0.1:8080;
}
#location /default {
# try_files $uri $uri.html $uri/index.html =404;
#}
#location ~ \.html$ {
# access_log off;
# proxy_pass http://127.0.0.1:8080;
#}
location ~ /\.ht {
deny all;
}
~
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
etc/nginx/nginx.conf:
user apache;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
client_max_body_size 10m;
client_body_buffer_size 128k;
client_header_buffer_size 2k;
large_client_header_buffers 4 16k;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/plain text/html application/x-javascript text/xml text/css;
index index.php index.htm index.html
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/conf.d/proxy.inc;
include /etc/nginx/sites-enabled/*.conf;
}
I installed nginx reverse proxy in my server. All are working are working well expect redirection to .html pages.
MY site is magento and test.com/default is working but test.com/default/test.hml getting 404 nginx error.
Please advice.
My configuration:
/etc/nginx/sites-enabled/default.inc:
location / {
#try_files $uri $uri/ /index.php;
try_files $uri $uri/ /index.php?q=$request_uri;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
break;
}
location ~ \.(jpg|jpeg|png|gif|swf|ico|js|css|txt|htm|html|xml|bmp|pdf|doc|docx|ppt|pptx|zip)$ {
expires 30d;
break;
}
location ~ \.php$ {
access_log off;
proxy_pass http://127.0.0.1:8080;
}
#location /default {
# try_files $uri $uri.html $uri/index.html =404;
#}
#location ~ \.html$ {
# access_log off;
# proxy_pass http://127.0.0.1:8080;
#}
location ~ /\.ht {
deny all;
}
~
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
etc/nginx/nginx.conf:
user apache;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
client_max_body_size 10m;
client_body_buffer_size 128k;
client_header_buffer_size 2k;
large_client_header_buffers 4 16k;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/plain text/html application/x-javascript text/xml text/css;
index index.php index.htm index.html
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/conf.d/proxy.inc;
include /etc/nginx/sites-enabled/*.conf;
}