Welcome! Log In Create A New Profile

Advanced

how to setup 2 domains

Posted by matrixebiz 
how to setup 2 domains
September 24, 2018 06:34PM
Hello, I have 2 domain names so how do I set that up? do I just add a second server setting in nginx.conf? want the second one to go to a subfolder in my main webserver folder. thanks
Re: how to setup 2 domains
September 24, 2018 09:45PM
I tried to set 2 servers like the below but nginx doesn't start when I do :(

server {
listen 80;
server_name server1.com;
root C:/xampp/htdocs;
access_log off;
error_log off;
location / {
#root html;
index index.html index.htm;
}

server {
listen 80;
server_name server2.com;
root C:/xampp/htdocs/Test;
access_log off;
error_log off;
location / {
#root html;
index index.html index.htm;
}



Edited 1 time(s). Last edit at 09/24/2018 09:46PM by matrixebiz.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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