- Previous thread: Big Problem with Nginx and modules
- Next thread: Critical SSL Errors
- Threads sorted by date: nginx 200907
I have a site that is completely static and I figured I would use
try_files however this results in HTTP 500 errors for directories i.e.
trying to get to http://foo.com/bar/ results in a 500 error. What's
wrong with this config? Thanks.
--Jauder
server {
# port to listen on. Can also be set to an IP:PORT
listen 80;
# Set the charset
charset utf-8;
# sets the domain[s] that this vhost server requests for
server_name www.foo.com;
# doc root
root /var/www/foo.com;
# vhost specific access log
access_log /var/log/nginx_access.log main;
# Catchall for everything else
location / {
root /var/www/foo.com;
access_log off;
index index.html index.shtml;
expires 1d;
try_files $uri $uri/;
#if (-f $request_filename) {
# break;
#}
}
error_page 500 502 503 504 /500.html;
error_page 404 /404.html;
}
--
Posted via http://www.ruby-forum.com/.
try_files however this results in HTTP 500 errors for directories i.e.
trying to get to http://foo.com/bar/ results in a 500 error. What's
wrong with this config? Thanks.
--Jauder
server {
# port to listen on. Can also be set to an IP:PORT
listen 80;
# Set the charset
charset utf-8;
# sets the domain[s] that this vhost server requests for
server_name www.foo.com;
# doc root
root /var/www/foo.com;
# vhost specific access log
access_log /var/log/nginx_access.log main;
# Catchall for everything else
location / {
root /var/www/foo.com;
access_log off;
index index.html index.shtml;
expires 1d;
try_files $uri $uri/;
#if (-f $request_filename) {
# break;
#}
}
error_page 500 502 503 504 /500.html;
error_page 404 /404.html;
}
--
Posted via http://www.ruby-forum.com/.
I see no reason to be using try_files at all in your config.
Sent from my iPhone
On Jul 6, 2009, at 10:33 PM, Jauder Ho wrote:
> I have a site that is completely static and I figured I would use
> try_files however this results in HTTP 500 errors for directories i.e.
> trying to get to http://foo.com/bar/ results in a 500 error. What's
> wrong with this config? Thanks.
>
> --Jauder
>
> server {
> # port to listen on. Can also be set to an IP:PORT
> listen 80;
>
> # Set the charset
> charset utf-8;
>
> # sets the domain[s] that this vhost server requests for
> server_name www.foo.com;
>
> # doc root
> root /var/www/foo.com;
>
> # vhost specific access log
> access_log /var/log/nginx_access.log main;
>
>
> # Catchall for everything else
> location / {
> root /var/www/foo.com;
> access_log off;
>
> index index.html index.shtml;
> expires 1d;
>
> try_files $uri $uri/;
>
> #if (-f $request_filename) {
> # break;
> #}
> }
>
>
>
> error_page 500 502 503 504 /500.html;
> error_page 404 /404.html;
>
> }
> --
> Posted via http://www.ruby-forum.com/.
>
Sent from my iPhone
On Jul 6, 2009, at 10:33 PM, Jauder Ho wrote:
> I have a site that is completely static and I figured I would use
> try_files however this results in HTTP 500 errors for directories i.e.
> trying to get to http://foo.com/bar/ results in a 500 error. What's
> wrong with this config? Thanks.
>
> --Jauder
>
> server {
> # port to listen on. Can also be set to an IP:PORT
> listen 80;
>
> # Set the charset
> charset utf-8;
>
> # sets the domain[s] that this vhost server requests for
> server_name www.foo.com;
>
> # doc root
> root /var/www/foo.com;
>
> # vhost specific access log
> access_log /var/log/nginx_access.log main;
>
>
> # Catchall for everything else
> location / {
> root /var/www/foo.com;
> access_log off;
>
> index index.html index.shtml;
> expires 1d;
>
> try_files $uri $uri/;
>
> #if (-f $request_filename) {
> # break;
> #}
> }
>
>
>
> error_page 500 502 503 504 /500.html;
> error_page 404 /404.html;
>
> }
> --
> Posted via http://www.ruby-forum.com/.
>
Related Threads
- svn commit: r991550 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/library/ActiveMQCPP.cpp main/activemq/util - activemq
- help with kannel linking with mysql - kannel
- Querying a many-to-many field based on entries' number in the relationship - django
- Skipping empty files, problem with simple language - apachecamel
- How can spawning subprocesses affect buffering? - ruby
- Openvpn-devel - openvpn and dll hijacking? - openvpn
- how to break china gfw with ruby? - ruby
- jira - Created: (CAMEL-3100) ${file:length} should return 0 instead of null if the file length is 0 - apachecamel
- ANN - zenprofile 1.3.0 Released - ruby
- clug - Install Fest ( 25th Sept 2010 ) - samba
- sqlite - memory wasted shm mapped file (3.7.2) - sqlite
- Patch,Fortran - PR45186 - P2 regression - gfortran 4.6 emits wrong line numbers - gcc