Hi,
I’m trying to create an archive based on a current site which is due to
be taken down, I’ve used “wget -m” to mirror the site and all seems well
except I’m having trouble with what I think are arguments in the url.
Most everything seems to work ok and this is currently my only issue. I
have on disk the file /dir/page.php?a=1&b=2 for example but nginx
returns a 404 when accessing http://localhost/dir/page.php?a=1&b=2, I’ve
tried adding $args to the try_files directive but it’s not made a
difference and my google-fu is more google-fail today.
Can someone point me in the right direction please? My current test
config is below.
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable “msie6”;
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /home/steve/archive;
index index.html index.htm index.php;
server_name localhost;
location / {
try_files $uri$args $uri $uri/ =404;
}
}
–
Steve