accessing a webpage stored on a home server

Internet of Things IoT Frameworks 3 years ago

8.43K 1 0 0 0

_x000D_ _x000D_ I am running a raspberry pi using raspbian linux. I have apache web service installed and when i type in my ip address into the address bar of a browser it loads the default apache webpage saying it all works. I have another folder located in home/Client5 on this device from which i am trying to load an index.html page but i am recieving a 404 not found error. eg 192.304.0.22/home/Client5/index.html Not Found The requested URL /home/Client5/task5.html was not found on this server. I gather that theres something wrong in the above web adress or is it that i have to place this folder within the apache folder?

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago
_x000D_ You have two solutions. 1/ If you want to keep the default apache pages, add a virtualhost (there are tons of docs on this, I don't think it needs to be repeated here). 2/ If you don't care about the default apache pages, edit /etc/apache2/sites-available/default and change DocumentRoot to make it point to /home/Client5/ . Add an index.html file in there, hit the Raspberry IP in your browser, you should see your page. You might need to chmod -R ugo+rwX /home/Client5. I don't know what you have under /home/Client5, but if it's a regular user, this setup is highly insecure. There are a bunch of additional steps to take if you want to host under home directories (first step, don't put pages in $HOME but create a subdir). It is safer to have a dedicated place with proper perms outside home dirs unless you really know what you're doing.
0 views
0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum


Q

Azure IoT hub and sending messages with mosquitto_pub

_x000D_ _x000D_ I'm trying to send some simple message with mosquitto_pub to Azure IoT HUB but faced...
Q

How to generate AWS bootstrap certificates with java SDK?

_x000D_ _x000D_ According to this docs I need to generate so-called bootstrap certificates for my Io...
Q

is it possible to do 3way handshake only one time with mqtt communication?

_x000D_ _x000D_ I am using mosquitto_pub to publish the data with TLS using a topic. I am using mosq...

Important Internet of Things Links