Apache virtual Host on Ubuntu 20.04

  1. Install apache on ubuntu
Change port 80 to be 8082
sudo mkdir telo.com
create new project directory
create new index.php
<?php echo “<p>Hello welcome to telo.com</p>”; ?>
sudo gedit telo.com.conf
cretae new config file
<VirtualHost *:8082>
ServerName telo.com
DocumentRoot /var/www/html/telo.com
<Directory /var/www/html/telo.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/apache2/telo.com_error.log
CustomLog /var/log/apache2/telo.com_access.log combined
</VirtualHost>
sudo a2ensite telo.com.conf
after activation you will see active sites conf on sites-enabled directory
sudo systemctl reload apache2sudo systemctl restart apache2
ip address in server / laptop
sudo gedit hosts
192.168.1.6  telo.com
Access http://telo.com:8082
<VirtualHost *:8082>
ServerName helloworld.web
DocumentRoot /var/www/html/test
<Directory /var/www/html/test>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/apache2/helloworld.web_error.log
CustomLog /var/log/apache2/helloworld.web_access.log combined
</VirtualHost>
sudo a2ensite hello-world.conf.conf
192.168.1.6  helloword.web
sudo systemctl reload apache2sudo systemctl restart apache2
the web is working

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

LESSON 8 : 8.2 The Alarm Manager

Improving Your Data Layer with Rebase on Python

Defying the stigma, ZKSwap’s Clarification on Bad Rumours

Should We Get Rid Of The Product Backlog?

Why Embedded Server is so important?

How To Be A Software Engineer

Conquest of Distributed Systems (part 1) — Business Workflows

Understanding Kubernetes — Deployment Controller

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
wahyu eko hadi saputro

wahyu eko hadi saputro

i am a reader

More from Medium

How to install docker and docker-compose on an almost air-gapped computer ( a computer…

Install Postgresql 13 on RHEL 8. Configure scram-sha-256 password authentication.

Https implementation on apache ubuntu with let’s encrypt

Use docker-compose to run PostgreSQL