hosting_more_than_one_website_on_the_same_apache2_server
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
hosting_more_than_one_website_on_the_same_apache2_server [2016/07/24 20:01] – walkeradmin | hosting_more_than_one_website_on_the_same_apache2_server [2023/03/09 22:35] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Hosting more than one website on the same Apache2 Server ====== | + | ====== Hosting more than one website on the same Apache2 Server |
\\ | \\ | ||
\\ | \\ | ||
Line 18: | Line 18: | ||
</ | </ | ||
\\ | \\ | ||
- | We need to copy and paste this section for each site we wish to create. | + | We need to copy and paste this section for each site we wish to create.\\ |
\\ | \\ | ||
In this example we will have two websites, site one and site2, and they are located in the following place: | In this example we will have two websites, site one and site2, and they are located in the following place: | ||
\\ | \\ | ||
\\ | \\ | ||
- | / | + | / |
- | / | + | / |
\\ | \\ | ||
\\ | \\ | ||
Line 47: | Line 47: | ||
\\ | \\ | ||
sudo / | sudo / | ||
- | \\ | ||
\\ | \\ | ||
Use the hash # to comment out every line | Use the hash # to comment out every line | ||
Line 54: | Line 53: | ||
Now add the following: | Now add the following: | ||
\\ | \\ | ||
- | NameVirtualHost *:80 | ||
- | < | ||
- | ServerAdmin al@nwalker.co.uk | ||
- | ServerName site1.alanwalker.eu | ||
- | DocumentRoot / | ||
- | DirectoryIndex index.html | ||
- | </ | ||
< | < | ||
ServerAdmin al@nwalker.co.uk | ServerAdmin al@nwalker.co.uk | ||
- | ServerName site2.alanwalker.eu | + | |
- | DocumentRoot / | + | DocumentRoot / |
- | DirectoryIndex index.html | + | DirectoryIndex index.html --- (this is the first page of your website) |
+ | </ | ||
+ | < | ||
+ | ServerAdmin al@nwalker.co.uk | ||
+ | | ||
+ | DocumentRoot / | ||
+ | DirectoryIndex index.html | ||
</ | </ | ||
\\ | \\ | ||
Line 73: | Line 71: | ||
\\ | \\ | ||
\\ | \\ | ||
+ | Now if I navigate to // | ||
+ | \\ | ||
+ | \\ | ||
+ | {{: | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | If I navigate to // | ||
+ | \\ | ||
+ | \\ | ||
+ | {{: | ||
+ | \\ | ||
+ | \\ | ||
hosting_more_than_one_website_on_the_same_apache2_server.1469386866.txt.gz · Last modified: 2023/03/09 22:35 (external edit)