virtual server configuration

Wong Kee Wee wongkeewee at gmail.com
Mon Jun 17 15:41:48 UTC 2013


Hi Janet,

Can you show us the content of your nginx.conf?

Do you have the 'include' directive in your nginx.conf to point to your
sites-available?

For example:
http {

...
include /etc/nginx/sites-available/*;
...

}

Best regards,
Wong Kee Wee


Hi Sajan
>
> Yes I did restart nginx. I've tried several times.
>
> Just tried nginx -t and all seems to be fine.
>
> nginx -t
> nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
> nginx: configuration file /etc/nginx/nginx.conf test is successful
>
>
> JV
>
>
> On 17 June 2013 15:48, Sajan Parikh <sajan at noppix.com> wrote:
>
> >  Did you restart nginx for the new configuration to take effect?  Run
> > 'sudo service nginx restart' to do this.  Also run 'nginx -t' to test
> your
> > configuration.
> >
> > Sajan Parikh
> > *Owner, Noppix LLC*
> >
> > e: sajan at noppix.com
> > p: (563) 726-0371
> >
> > [image: Noppix LLC Logo]
> > On 06/17/2013 09:36 AM, Janet Valbuena wrote:
> >
> >  Hi
> >
> > I'm new to nginx. I'm trying to configure a virtual server.
> >
> >  I've created a new server file under sites-enabled like this:
> >
> >  server {
> >     listen  80; ## listen for ipv4; this line is default and implied
> >
> >     server_name blogtest;
> >
> >     root /usr/share/nginx/cakephptest/app/webroot;
> >     index index.php;
> >
> >     location / {
> >             # First attempt to serve request as file, then
> >             # as directory, then fall back to 404
> >             try_files $uri $uri/ =404;
> >     }
> >     # PHP FPM
> >     location ~ \.php$ {
> >             fastcgi_pass 127.0.0.1:9000;
> >             fastcgi_index index.php;
> >             include fastcgi_params;
> >             fastcgi_intercept_errors on;
> >             fastcgi_buffers 8 16k;
> >             fastcgi_buffer_size 32k;
> >             fastcgi_split_path_info ^(.+\.php)(/.+)$;
> >             fastcgi_param PATH_INFO $fastcgi_path_info;
> >             fastcgi_param PATH_TRANSLATED
> $document_root$fastcgi_path_info;
> >             fastcgi_param SCRIPT_FILENAME
> > $document_root$fastcgi_script_name;
> >     }
> > }
> >
> >
> >  Is there anything wrong with that?
> >  When I type in blogtest/index.php on the browser I get the default
> > config, which points to /usr/share/nginx/www/, even though I deleted the
> > symbolic link to sites-available/default from sites-enabled.
> >
> >  Note: /usr/share/nginx/cakephptest/app/webroot/index.php does exist.
> >
> >  Could anyone please help.
> >
> >  Thanks
> >
> >  JV
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130617/4a66ce2c/attachment.html>


More information about the nginx mailing list