Advertisement
rodro1

Nginx install on centos7

Jun 24th, 2021
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Html file:
  2. /usr/share/nginx/html
  3.  
  4. Configuration:
  5. /etc/nginx/nginx.conf
  6.  
  7.  
  8. epel
  9. ============
  10. extra package for enterprise linux
  11. nginx count as non standard package
  12.  
  13. Step 1:
  14. yum install -y epel-release
  15.  
  16. Step 2:
  17. yum -y install nginx
  18.  
  19. Step 3:
  20. systemctl : service management system
  21. systemctl start nginx
  22.  
  23. step 4:
  24. systemctl status nginx
  25.  
  26. step 5: (when start server start nginx automitacliy)
  27. systemctl enable nginx
  28.  
  29. step 6: (if you want to create seperate domain config on nginx)
  30. ======
  31. /etc/nginx/conf.d/abcalumni.conf
  32.  
  33. step 7: (test nginx.conf file ok or not)
  34. nginix -t
  35.  
  36. step 8: (restart nginx)
  37. systemctl restart nginx
  38.  
  39. step 9: (check open port and applications) (t = tcp ip, l = listen socket, n = number on ports)
  40. netstat -tln
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement