Welcome! Log In Create A New Profile

Advanced

Nginx serverblocks???

Posted by Rosegarden 
Nginx serverblocks???
December 30, 2013 01:43PM
I'm trying to install nginx because i want to host multiple websites on a vps centos6



my /etc/hosts looks like this



127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

149.210.155.29 example1.nl www.example1.nl example2.nl www.example2.nl

and /etc/nginx.conf.d/virtual.conf is als volgt.


#
# A virtual host using mix of IP-, name-, and port-based configuration
#

server {
listen 80;
# listen *:80;
server_name .example1.nl;

location / {
root /var/www/example1.nl/public_html/;
index index.html index.htm;
}
}


server {
listen 80;
# listen *:80;
server_name .example2.nl;

location / {
root /var/www/example2.nl/public_html/;
index index.html index.htm;
}
}


I'm doing something wrong
with nginx -t every thing looks oke...

did I forget something?



When I'm going to the url of the websites..
I do not see anything at all




newbee Ohw Yess!!! But I like IT!!
Re: Nginx serverblocks???
June 01, 2014 11:25AM
Same problem here...
Following lots of tutorials out there, and the official documentation: It should work that way
But it isn't working for me aswell
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 207
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready