Home > Back-end >  How to implement a Virtual host on AWS Linux Server?
How to implement a Virtual host on AWS Linux Server?

Time:02-04

We already created a Linux server using Xampp. But we have 3-4 websites that we have to live there. But in xampp we live only one website in the root folder. We are thinking about a Virtual host. Below of our code:

On httpd.conf file:

Include conf/extra/httpd-vhosts.conf

We need help for setup httpd-vhosts.conf file. What we will code there?

CodePudding user response:

I think you need to update your httpd-vhosts.conf file link that:

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot <PATH_TO_PROJECT_DIRECTORY_HERE>
ServerName <SERVER_NAME like local.pos.com>
ServerAlias <WWW.SERVER_NAME local.pos.com>
</VirtualHost>

Be careful, it will need for every website if the website is not running on the root folder. Also, you have to restart your server, for active this service.

  •  Tags:  
  • Related