How to connect to my Chromebook's Apache server from another computer?
How to connect to my Chromebook’s Apache server from another computer?
Get your Chromebook’s IP address
- In Settings, go to Linux development environment (Beta) > Port forwarding
-
Google, “what is my ip address” ‘70.113.50.4 Your public IP address`
- Open Terminal
Run
hostname -I
100.115.92.205 - Run
cd
to make sure you’re in your home directory.
Set the IP address where you’ll receive the Apache requests
Do this using the NameVirtualHost
directive within the apache configuration i.e. httpd.conf/apache2.conf file.
- Copy the
000-default.conf
file to your home directory:cp /etc/apache2/sites-available/000-default.conf ./
- Open the
000-default.conf
in your text editor. - Edit
<VirtualHost *:80>
to<VirtualHost *:8080>
-
Move
000-default.conf
back to :sudo cp 000-default.conf /etc/apache2/sites-available/000-default.conf
- Copy the
ports.conf
file to your home directory:cp /etc/apache2/ports.conf ./
-
Move
ports.conf
back to :sudo cp ports.conf /etc/apache2/ports.conf
- Similarly, enable files and directory listing:
/etc/apache2/apache2.conf
- Change
<Directory /var/www/>
to<Directory /path/to/home/directory/www/>
Restart the server
- Then restart the apache server:
sudo service apache2 restart
Sources
- https://support.google.com/chromebook/thread/106121945?hl=en&msgid=106207522#
- https://chromeos.dev/en/web-environment/port-forwarding
- https://www.thegeekdiary.com/beginners-guide-to-apache-http-server/
- https://www.thegeekdiary.com/apache-http-server-most-commonly-used-configuration-directives/
- https://www.guru99.com/apache.html
Written on April 12, 2021