Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cd /etc/nginx/sites-available
- ls -l
- -rw-r--r-- 1 root root 2074 dateredacted default
- -rw-r--r-- 1 root root 2092 dateredacted example.com
- -rw-r--r-- 1 root root 1524 dateredacted t.example.com
- cd /etc/nginx/sites-enabled
- ls -l
- lrwxrwxrwx 1 root root 52 dateredacted example.com -> /etc/nginx/sites-available/example.com
- lrwxrwxrwx 1 root root 54 dateredacted t.example.com -> /etc/nginx/sites-available/t.example.com
- vi /etc/nginx/sites-available/t.example.com
- server {
- listen 80;
- server_name t.example.com;
- root /var/www/vhosts/t.example.com/httpdocs;
- access_log /var/www/vhosts/t.example.com/logs/access.log;
- error_log /var/www/vhosts/t.example.com/logs/error.log;
- index index.html;
- }
- cat /var/www/vhosts/t.example.com/httpdocs/index.html
- index
- cd /var/www/vhosts/
- chown -Rf www-data:www-data t.example.com
- chmod -Rf 755 t.example.com
- nginx -t
- nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
- nginx: configuration file /etc/nginx/nginx.conf test is successful
- systemctl restart nginx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement