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

How to define nginx code for per Domain?

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

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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