How to define nginx code for per Domain?
December 11, 2018 03:13AM
my /etc/nginx/nginx.conf code is :

server {
.....
location / {
root /var/www/public_folder;
index index.php index.html index.htm;
}
.
.
.
}

------------------------------------------------------------------------------------------------------------------------------------
and my created Domain config file is:
nano /etc/nginx/sites-available/definedname.com

server {

listen 80 default;
listen 443 http2 default_server;
listen [::]:443 http2 default_server;

server_name definedname.com www.definedname.com;
root /var/www/public_folder/definedname.com/$host;

.....
}

------------------------------------------------------------------------------------------------------------------------------------



when I want to go to my first page, I see global configuration index.html text, who defined within the global configuration route in /etc/nginx/nginx.conf , this text show in my domain first page

What is my mistake exactly?



Edited 2 time(s). Last edit at 12/11/2018 03:15AM by redscience.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 74
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready