Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. cd /etc/nginx/sites-available
  2. ls -l
  3. -rw-r--r-- 1 root root 2074 dateredacted default
  4. -rw-r--r-- 1 root root 2092 dateredacted example.com
  5. -rw-r--r-- 1 root root 1524 dateredacted t.example.com
  6.  
  7. cd /etc/nginx/sites-enabled
  8. ls -l
  9. lrwxrwxrwx 1 root root 52 dateredacted example.com -> /etc/nginx/sites-available/example.com
  10. lrwxrwxrwx 1 root root 54 dateredacted t.example.com -> /etc/nginx/sites-available/t.example.com
  11.  
  12. vi /etc/nginx/sites-available/t.example.com
  13.  
  14. server {
  15. listen 80;
  16.  
  17. server_name t.example.com;
  18.  
  19. root /var/www/vhosts/t.example.com/httpdocs;
  20.  
  21. access_log /var/www/vhosts/t.example.com/logs/access.log;
  22. error_log /var/www/vhosts/t.example.com/logs/error.log;
  23.  
  24. index index.html;
  25. }
  26.  
  27. cat /var/www/vhosts/t.example.com/httpdocs/index.html
  28. index
  29.  
  30. cd /var/www/vhosts/
  31. chown -Rf www-data:www-data t.example.com
  32. chmod -Rf 755 t.example.com
  33.  
  34. nginx -t
  35. nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
  36. nginx: configuration file /etc/nginx/nginx.conf test is successful
  37. systemctl restart nginx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement