Welcome! Log In Create A New Profile

Advanced

Re: VHost Guidance

April 20, 2015 02:12PM
Hi, I'm not sure what you did, but nginx.conf file, is only used to
configure the http server, not vhosts.

There is 2 ways to setup vhosts (called server blocs in NginX) :

A. Use the default config file (usually located @
/etc/nginx/sites-available/default) and add all your vhosts there. The
default file is self explanatory

B. You can use a different file for every server bloc (vhost) by making a
copy of the default file :
/etc/nginx/sites-available/vhost1.tld
/etc/nginx/sites-available/vhos2.tld
....

I think the conflict you are facing is due to default config file, delete
the symbolic link found in /etc/nginx/sites-enabled/ folder.

Hope this helps

Some interesting readings when starting with NginX :
http://nginx.org/en/docs/beginners_guide.html
http://blog.martinfjordvald.com/2010/07/nginx-primer/

2015-04-20 19:34 GMT+02:00 daBee <nginx-forum@nginx.us>:

> Hi folks.
>
> Brand new to nginx. I'm trying to run 3 vhosts on my workstation to get
> familiar with nginx.
>
> alpha
> bravo
> charlie
>
> I'm using bravo in the main nginx.conf pointing to /var/www/alpha/
>
> bravo and charlie are in settings/vhosts.conf into /var/www/bravo and
> /var/www/charlie
>
> Upon trying to start nginx (installed via homebrew on OSX), I get the
> following:
>
> HQ:~ rich$ sudo nginx
> nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)
> nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)
> nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)
> nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)
> nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)
> nginx: [emerg] still could not bind()
>
> Not too sure what that means. I'm sure it's a directive that's not entered
> for localhost.
>
> Anyway, any leadership appreciated as to how to get this thing going.
>
> Cheers
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,258229,258229#msg-258229
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

VHost Guidance

daBee April 20, 2015 01:34PM

Re: VHost Guidance

Styopa Semenukha April 20, 2015 01:52PM

Re: VHost Guidance

daBee April 20, 2015 01:54PM

Re: VHost Guidance

Jason Woods April 20, 2015 02:02PM

Re: VHost Guidance

daBee April 20, 2015 02:08PM

Re: VHost Guidance

shiroweb April 20, 2015 02:12PM

Re: VHost Guidance

daBee April 21, 2015 12:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 312
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