I installed Linux (Ubuntu 20.04.1) in Windows using virtualbox and tried to build a file server, so next I tried to build a web server. It is a memo of.
File server construction ↓ https://qiita.com/toki_k/items/f805421f809c67d0c92b
$ sudo apt install ufw
First, install it.
Next, set the firewall.
$ sudo ufw allow 22 $ sudo ufw allow 80
All connections on port +22 and port +80 are allowed. 22 allows ssh 80 is for http permission. Used by apache
$ sudo ufw allow samba
Click here to check the status such as permitted items ↓ You can see it in the list.
$ sudo ufw status
$ sudo apt install apache2
If the installation is successful, you should be able to access it from your browser.
Check the server name.
You can open a browser and access the default page with "http: // (hostname)". Enter the value confirmed by hostname in (server name).
The page that Apache displays is like "/ var / www / html /". It seems to be called the document root
$ cd /var/www/html $ vim hello.html
First, cd to the document root. Open vim and create a new file.
In your browser, enter http: // (hostname) /hello.html. You can now access the page you created! !!