I just switched over to nginx as a static file server and it works for the vast majority of files but it's throwing a 404 on certain files with special characters.
This is Kevin Worthington's 64 bit build of nginx running on Windows Server 2008 R2.
My nginx.conf entry looks like this...
server {
server_name example.com;
listen 80;
location /static/ {
root /c
I'm serving up a static site via nginx.
location ~* \.(avi|bin|bmp|dmg|doc|docx|dpkg|exe|flv|gif|htm|html|ico|ics|img|jpeg|jpg|m2a|m2v|mov|mp3|mp4|mpeg|mpg|msi|pdf|pkg|png|ppt|pptx|ps|rar|rss|rtf|swf|tif|tiff|txt|wmv|xhtml|xls|xml|zip)$ {
root /var/www/html1;
access_log off;
expires 1d;
}
And my goal is to exclude requests like http://connect1.webinar.ru/converte
I need some help with nginx's try_files directive.
i have a server
server {
listen 80; ## listen for ipv4
listen [::]:80 default ipv6only=on; ## listen for ipv6
access_log /var/log/nginx/localhost.access.log;
location ~* \.(png|ico)$ {
root /home/anatoly/gyazo;
}
location / {
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
proxy_set_header Ho
I've an Nginx as a reverse Proxy for static content. And an Apache for dynamic content.
I have subdomain set up under Nginx and proxy passing to Apache to serve PHP files
Below is my config:
server {
listen 80;
server_name sub.domain.com.au;
location ~* \.(css|js|jpg|jpeg|gif|png|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|tar|wav|bmp|rtf|swf|ico|flv|txt|docx|xlsx)$ {
root /var/www/html/domain;
index index.php;
I'm testing a setup where I'd like to have nginx serve up static media and proxy all other requests to another backend. My configuration looks like this:
location /media {alias /var/httpd/media;}
location / {proxy_pass http://127.0.0.1:8080;}
However, if a request is made for a non-existing media resource, e.g.
We are using nginx to serve static content and apache for dynamic content.
I have defined a default server configuration as:
#Set a default server that simply proxies all requests to apache
server
{
listen 80 default_server;
server_name _;
location /
{
proxy_pass http://127.0.0.1:8080;
}
}
Is the the best way to proxy everything to apache if for some reason a ser
I have a few questions about this configuration file "default" in /etc/nginx/sites-enabled.