User Tools

Site Tools


hosting_more_than_one_website_on_the_same_apache2_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
hosting_more_than_one_website_on_the_same_apache2_server [2016/07/24 20:02] walkeradminhosting_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 (Raspbian) ======
 \\  \\ 
 \\  \\ 
Line 53: Line 53:
 Now add the following: Now add the following:
 \\  \\ 
-    NameVirtualHost *:80 
-        <VirtualHost *:80> 
-            ServerAdmin al@nwalker.co.uk 
-            ServerName site1.alanwalker.eu 
-            DocumentRoot /home/pi/site1 
-            DirectoryIndex index.html 
-        </VirtualHost> 
     <VirtualHost *:80>     <VirtualHost *:80>
         ServerAdmin al@nwalker.co.uk         ServerAdmin al@nwalker.co.uk
-        ServerName site2.alanwalker.eu +        ServerName site1.alanwalker.eu --- (this has to match the url of your website) 
-        DocumentRoot /home/pi/site2 +        DocumentRoot /home/pi/site1 --- (this is where your website is physically in linux) 
-        DirectoryIndex index.html+        DirectoryIndex index.html --- (this is the first page of your website) 
 +    </VirtualHost> 
 +    <VirtualHost *:80> 
 +        ServerAdmin al@nwalker.co.uk 
 +        ServerName site2.alanwalker.eu --- (this has to match the url of your website) 
 +        DocumentRoot /home/pi/site2 --- (this is where your website is physically in linux) 
 +        DirectoryIndex index.html --- (this is the first page of your website)
     </VirtualHost>     </VirtualHost>
 \\  \\ 
Line 72: Line 71:
 \\  \\ 
 \\  \\ 
 +Now if I navigate to //**site1.alanwalker.eu**// I get: 
 +\\  
 +\\  
 +{{:site1.png|}} 
 +\\  
 +\\  
 +\\  
 +\\  
 +If I navigate to //**site.alanwalker.eu**// I get: 
 +\\  
 +\\  
 +{{:site2.png|}} 
 +\\  
 +\\ 
  
  
hosting_more_than_one_website_on_the_same_apache2_server.1469386924.txt.gz · Last modified: 2023/03/09 22:35 (external edit)