virtual server configuration
Vasil Kolev
vasil at ludost.net
Mon Jun 17 19:58:56 UTC 2013
rm /etc/nginx/sites-enabled/default should fix it, the default takes
over everything, from what I've seen.
В 16:56 +0100 на 17.06.2013 (пн), Janet Valbuena написа:
> Hi Wong
>
> I installed nginx recently and haven't changed anything in nginx.conf.
>
>
> It actually doesn't include /etc/nginx/sites-available/* but it does
> include /etc/nginx/sites-enabled/*, which is where I put a symbolic
> link of my config file.
>
> user www-data;
> worker_processes 4;
> pid /var/run/nginx.pid;
>
> events {
> worker_connections 768;
> # multi_accept on;
> }
>
> http {
>
> ##
> # Basic Settings
> ##
>
> sendfile on;
> tcp_nopush on;
> tcp_nodelay on;
> keepalive_timeout 65;
> types_hash_max_size 2048;
> # server_tokens off;
>
> # server_names_hash_bucket_size 64;
> # server_name_in_redirect off;
>
> include /etc/nginx/mime.types;
> default_type application/octet-stream;
>
> ##
> # Logging Settings
> ##
>
> access_log /var/log/nginx/access.log;
> error_log /var/log/nginx/error.log;
>
> ##
> # Gzip Settings
> ##
>
> gzip on;
> gzip_disable "msie6";
>
> # gzip_vary on;
> # gzip_proxied any;
> # gzip_comp_level 6;
> # gzip_buffers 16 8k;
> # gzip_http_version 1.1;
> # gzip_types text/plain text/css application/json
> application/x-javascript text/xml application/xml application/xml+rss
> text/javascript;
>
> ##
> # nginx-naxsi config
> ##
> # Uncomment it if you installed nginx-naxsi
> ##
>
> #include /etc/nginx/naxsi_core.rules;
>
> ##
> # nginx-passenger config
> ##
> # Uncomment it if you installed nginx-passenger
> ##
>
> #passenger_root /usr;
> #passenger_ruby /usr/bin/ruby;
>
> ##
> # Virtual Host Configs
> ##
>
> include /etc/nginx/conf.d/*.conf;
> include /etc/nginx/sites-enabled/*;
> }
>
>
> Just in case it helps I'm using Ubuntu 12.04 LTS
>
>
> Thanks
>
>
>
>
>
> On 17 June 2013 16:41, Wong Kee Wee <wongkeewee at gmail.com> wrote:
> 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
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
>
>
> --
> WiFi SPARK
> Facebook Twitter
> Janet Valbuena
> Software Developer
> t: 0844 848 9555 | f: 01626 834 745
> w: wifispark.com
> 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.
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
--
Regards,
Vasil Kolev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130617/ac345e78/attachment-0001.bin>
More information about the nginx
mailing list