Ravindra Bagale · AWSसर्व coursesया course चे lessonsशोधाEnglish

AWS · मराठी आवृत्ती

7.14 Static site troubleshooting

रवींद्र बागले यांच्या course वर आधारित · सहज मराठीत explanation

या page मध्ये

एकावेळी एक check आणि एक बदल करा.

लक्षणशक्य कारणCheck/fix
TimeoutSG/firewall, public IP/route/NACL80 rule, firewall status, IP/IGW route
Connection refusedService बंद किंवा वेगळा portservice status; ss -tlnp
Default pageHost config match नाहीnginx -T; server_name; lab default link
403Index नाही, permissions/labels/Requirels -la; namei -l; 755/644; restorecon; logs
404चुकीचा root/path/caseIndex.html विरुद्ध index.html; config/log
CSS/images नाहीRelative path/file missingDevTools Network tab
502Proxy backend issueChapter 10; backend service/port/socket
बदल दिसत नाहीReload नाही किंवा syntax errornginx -t && service nginx reload
Stop/start नंतर बंदAuto IP बदललाEIP/DNS/server_name update
Address in usePort 80 दुसरा process वापरतोss -tlnp; योग्य दुसरी lab service stop

मुख्य commands

curl -I http://localhost                      # does it work from inside the server?
sudo ss -tlnp | grep -E ':80|:443'            # who is listening?
sudo tail -n 30 /var/log/nginx/error.log      # Nginx errors
sudo tail -n 30 /var/log/httpd/error_log      # Apache errors (AL2023 / CentOS)
sudo tail -n 30 /var/log/apache2/error.log    # Apache errors (Ubuntu)
namei -l /var/www/mysite/index.html           # permissions of every folder in the path

Localhost चालतं पण बाहेर नाही तर network/SG/NACL/firewall/IP/HTTPS तसेच bind address आणि Host-based config तपासा. Loopback response एकटं बाहेरच्या interface चा access सिद्ध करत नाही.

Lab

फक्त disposable lab मध्ये HTTP 80 rule तात्पुरता काढून बाहेर timeout पाहा. Server वर curl -I localhost चालतो का तपासा. लगेच मूळ 80 rule परत करून browser test करा; SSH rule बदलू नका.