Welcome! Log In Create A New Profile

Advanced

Re: Changing port on which Nginx listens?

Gilles Ganault
July 16, 2010 09:34AM
On Fri, 16 Jul 2010 14:08:50 +0200, Jérôme Loyet
<jerome@loyet.net> wrote:
>what's the content of index.php ? try by simply set <?php phpinfo(); ?>

Damn, now it's working, and I can't figure out why I couldn't connect
to it before :-)

Removing Nginx entirely (--purge), reinstalling, trying 80 then 8787,
with index.html or index.php works fine now. Go figure.

To solve the 403 issue, I simply added "index.html" to the list of
default resources:

=================
# cat /etc/nginx/sites-available/default
server {
#listen 80 default;
listen 8787 default;
server_name localhost;
access_log /var/log/nginx/localhost.access.log;
root /var/www/nginx-default;

location / {
#CHANGED index index.php;
index index.php index.html;
}

location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires 30d;
}

location ~ \.php$ {
include fastcgi_params;

fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass backend;
fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;

fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}

## Disable viewing .htaccess & .htpassword
location ~ /\.ht {
deny all;
}
}

upstream backend {
server 127.0.0.1:9000;
}
=================

Sorry guys about the trouble, and thanks for your help.


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Changing port on which Nginx listens?

Gilles Ganault July 16, 2010 04:46AM

Re: Changing port on which Nginx listens?

Jérôme Loyet July 16, 2010 06:40AM

Re: Changing port on which Nginx listens?

vesperto July 16, 2010 07:18AM

Re: Changing port on which Nginx listens?

Gilles Ganault July 16, 2010 07:50AM

Re: Changing port on which Nginx listens?

vesperto July 16, 2010 08:02AM

Re: Changing port on which Nginx listens?

Gilles Ganault July 16, 2010 08:06AM

Re: Changing port on which Nginx listens?

Jérôme Loyet July 16, 2010 08:12AM

Re: Changing port on which Nginx listens?

Gilles Ganault July 16, 2010 09:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 157
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready