nginx change root directory

Solutions on MaxInterview for nginx change root directory by the best coders in the world

showing results for - "nginx change root directory"
Luka
02 May 2016
1edit file
2
3> sudo vim /etc/nginx/sites-available/default
4
5server {
6    listen 80;
7    listen [::]:80;
8    root /mnt/volume-mn1/html; # # # change this # # #
9    index  index.php index.html index.htm;
10    server_name  example.com www.example.com;
11
12    location / {
13    try_files $uri $uri/ /index.php?$args;        
14    }
15    ...
16}
17
18save file
19
20make sure file is ok
21
22> sudo nginx -t
23
24restart nginx
25
26> sudo systemctl reload nginx.service
similar questions
queries leading to this page
nginx change root directory