Locations (vhosts), ubuntu server
May 30, 2013 05:58AM
Hello,
I have currently configured my domain as the following:
http://paste.ie/view/a4e9b7e7
I saved its content in a configuration file which I placed in : etc/nginx/sites-enabled (marcwensauer.de.conf)

This woks great, but if I follow the same pattern to add another domain, the server do not start nor is any error written to the log.
For example I like to create a configuration for my server IP without any domain:
I tried it like this:

server {

root /home/public/web/;
index index.html index.htm index.php;

# Make site accessible from http://localhost/
server_name localhost;

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.html;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ .php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}


Any idea why the server is not starting ?

Best Regards Marc
Re: Locations (vhosts), ubuntu server
June 05, 2013 03:54PM
Anyone ?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready