Chapter 7: Static Website Hosting (3 OSes × 2 Web Servers)
7.5 Step 3 (common): copy files and set permissions
sudo mkdir -p /var/www/mysite
sudo cp -r ~/mysite/* /var/www/mysite/
sudo find /var/www/mysite -type d -exec chmod 755 {} \;
sudo find /var/www/mysite -type f -exec chmod 644 {} \;
ls -la /var/www/mysite
Now follow the section for your combination.
Ravindra Bagale's Tip
Before you blame the web server, test from inside the server with curl -I http://localhost. If that works but the browser doesn't, the problem is outside (security group, firewall, IP, https). If it fails inside too, check the service and error log. This one test cuts your troubleshooting time in half.
Ravindra Bagale's Tip – मराठी
Web server ला दोष देण्याआधी server च्या आतूनच curl -I http://localhost ने test करा. ते चाललं पण browser मध्ये नाही चाललं, तर problem बाहेर आहे (security group, firewall, IP, https). आतूनही fail झालं तर service आणि error log तपासा. या एका test ने तुमचा troubleshooting चा वेळ निम्मा होतो.
Ravindra Bagale's Tip – हिंदी
Web server को दोष देने से पहले server के अंदर से ही curl -I http://localhost से test करो. अगर यह चल जाए पर browser में न चले, तो problem बाहर है (security group, firewall, IP, https). अगर अंदर से भी fail हो, तो service और error log चेक करो. यह एक test तुम्हारा troubleshooting का समय आधा कर देता है.