Windows | Nginx Mapped Hard Drive | Network Sharing

c0nw0nk nginx-forum at nginx.us
Fri Apr 4 22:38:03 UTC 2014


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.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,249008,249017#msg-249017



More information about the nginx mailing list