Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Locations (vhosts), ubuntu server

$
0
0
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

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>