Steps to Point a Domain to Ubuntu Apache

Apache PHP MySQL tools that power the web

So creating website is hard for new people, i believe if you are just starting and never don't before, it is gonna be really frustrating experiences. Deployment process is also one hell of experiment, without the help of experienced people near you, you'll gonna end up scratching your head a lot.

These are steps to add a domain name like `` to Ubuntu with Apache as the web server.

1. Login to your domain provider panel
I am using Namecheap, you can buy your domain anywhere.
- go to detail of your domain, then switch to Advanced DNS tab or something similar if you are not using Namecheap, maybe DNS management or could be something else.
- then set your host record, similar to this table:

A Record
A Record
Automatic is my server IP address, you must change it to your own.

2. Set permission to your web root
Using Vim, Nano or any kind of text editor, and using root user, edit /etc/apache2/httpd.conf and add this lines to the end of the file:

<Directory /home/techgalery/public_html/>
 Options Indexes FollowSymLinks
 AllowOverride All
 Require all granted

/home/techgalery/public_html/ is where my website located, so change it to your own website path.

3. Create a site configuration for your domain
Inside /etc/apache2/sites-available create a new file and add these lines:

<VirtualHost *:80>
 DirectoryIndex index.php index.html
 DocumentRoot /home/techgalery/public_html

Don't forget to change to actual domain name.

4. Then enable that configuration using this command

sudo en2site

5. To reload Apache

sudo service apache2 reload

I think by those steps, your domain should be pointed correctly to your web server. If there's any problem, it is better to contact your hosting provider, before you did too much and done nothing.


Post a Comment

Popular posts from this blog

ERROR 1348 Column Password Is Not Updatable When Updating MySQL Root Password

How To Connect SSH Using PEM Certificate On Windows

How To Create Spring Boot Project Using Netbeans

How To Synchronize Database Using Navicat