virtual server configuration

Janet Valbuena janet at
Mon Jun 17 14:36:27 UTC 2013


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_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

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.



  [image: WiFi SPARK]
[image: Facebook] <> [image:
*Janet Valbuena*
Software Developer
*t:* 0844 848 9555 | *f: *01626 834 745
*w: * <>

WiFi SPARK Ltd, Teignbridge Business Centre, Cavalier Road, Newton Abbot,
Devon, TQ12 6TZ

This message and its attachments are deemed confidential. If you are not
the intended recipient, you are strictly prohibited to disclose, copy,
distribute or take any action in relation to the contents of this message.
WiFi SPARK accepts no liability for virus transmission, for the content of
this email, or for the consequences of any actions taken on the basis of
the information provided, unless that information is subsequently confirmed
in writing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list