Here is my config.
server {
listen 80;
listen [::]:80;
server_name domain.com www.domain.com;
root z:/server/websites/ps/public_www;
index index.php index.html index.htm default.html default.htm;
location / {
root z:/server/websites/ps/public_www;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8000;
expires 3s;
max_ranges 0;
}
location ~ \.flv$ {
flv;
limit_rate 200k;
root z:/server/websites/ps/public_www;
expires max;
}
location ~ \.mp4$ {
limit_rate 200k;
root z:/server/websites/ps/public_www;
expires max;
}
location ~ \.gif$ {
limit_rate 50k;
root z:/server/websites/ps/public_www;
expires max;
}
location ~* \.(avi|m4v|mov|divx|webm|ogg|mp3|mpeg|mpg|zip|rar)$ {
limit_rate 90k;
root z:/server/websites/ps/public_www;
expires max;
}
location ~* \.(ico|png|jpg|jpeg|gif|flv|mp4|avi|m4v|mov|divx|webm|ogg|mp3|mpeg|mpg|swf|css|js|txt|zip|rar|xml)$ {
root z:/server/websites/ps/public_www;
expires max;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
return 404;
}
location ~ ^/(xampp|security|phpmyadmin|licenses|webalizer|server-status|server-info|cpanel|configuration.php) {
return 404;
}
}
For my machine running nginx connecting to my mapped hard drive. The hard drive name is Z:/
I Have apache running on port 8000 for php and html files only serving static content. All dynamic content is served by nginx. But when i go to access a nginx file i get given a 404 not found error.