Offline
Google this topic as per instructions in class and post what you find in reply to this thread. You must put your name in your post to get credit.
Offline
Tyler Markham
Per this section of some info I found on Apache's website
Basically you just make sure to have a Host (A) record on the DNS server, and from there edit something like this into your httpd.conf:# Ensure that Apache listens on port 80
Listen 80
<VirtualHost *:80>
DocumentRoot "/www/example1"
ServerName www.example.com
# Other directives here
</VirtualHost
Where DocumentRoot is the location of your websites, ServerName is where you specify the server name matching your Host (A) record, and if you needed any further configuration you could put more instructions there.
Last edited by forthe48 (5/06/2016 8:45 am)
Offline
Spencer Oudeans
Open /etc/httpd/conf/httpd.conf and make changes similiar to these:
Listen 81
Listen 82
Listen 83
<VirtualHost *:81>
ServerAdmin asdf@site1.com
DocumentRoot /var/www/site1/html
ServerName site1.com
ErrorLog logs/site1-error_log
CustomLog logs/site1-access_log common
ScriptAlias /cgi-bin/ "/var/www/site1/cgi-bin/"
</VirtualHost>
<VirtualHost *:82>
ServerAdmin asdf@site2.com
DocumentRoot /var/www/site2/html
ServerName site2.com
ErrorLog logs/site2-error_log
CustomLog logs/site2-access_log common
ScriptAlias /cgi-bin/ "/var/www/site2/cgi-bin/"
</VirtualHost>
<VirtualHost *:83>
ServerAdmin asdf@site3.com
DocumentRoot /var/www/site3/html
ServerName site3.com
ErrorLog logs/site3-error_log
CustomLog logs/site3-access_log common
ScriptAlias /cgi-bin/ "/var/www/site3/cgi-bin/"
</VirtualHost>
Then you can refer to your sites by typing the different ports. ( http://ipaddress:81/ or :82 or :83)
I found this info at , near the bottom of the page
Last edited by Spencer (5/06/2016 8:36 am)
Offline
Michelle McIntyre
*>
An example!
ServerAdmin webmaster@example.com
ServerName www.example.com
ServerAlias example.com
# Indexes + Directory Root.
DirectoryIndex index.html
DocumentRoot /home/www/www.example.com/htdocs/
# CGI Directory
ScriptAlias /cgi-bin/ /home/www/www.example.com/cgi-bin/
<Location /cgi-bin>
Options +ExecCGI
</Location>
# Logfiles
ErrorLog /home/www/www.example.com/logs/error.log
CustomLog /home/www/www.example.com/logs/access.log combined
</VirtualHost>
:D
Last edited by Michelle (5/06/2016 8:46 am)
Offline
Devin McPherson
<VirtualHost *:80>
DocumentRoot /var/www/wordpress
</VirtualHost>
<VirtualHost *:80>
ServerName wordpress.devuxmachine.local
DocumentRoot /var/www/wordpress
</VirtualHost>
Offline
1.) Un-comment this part inside the httpd.conf file:
# vi /usr/local/apache2/conf/httpd.conf
Include conf/extra/httpd-vhosts.conf
2.) Setup virtual hosts inside the: httpd-vhosts.conf
NameVirtualHost *:80 – Indicates that all the name-based virtual hosts will be listening on the default port 80
<VirtualHost *:80> </VirtualHost> – Enclose all the apache configuration parameters for each and every virtual host between these VirtualHost tags. Any apache directives can be used within the virtualhost container.
In the following example, we are setting up virtual host for thegeekstuff.com and top5freeware.com listening on the same port 80. So, there will be two <VirtualHost *:80> </VirtualHost>, one for each website.
When you go to thegeekstuff.com, the files under /usr/local/apache2/docs/thegeekstuff will be served by Apache; and the access_log and error_log for this site will go under /usr/local/apache2/logs/thegeekstuff
Which will look like this:
# vi /usr/local/apache2/conf/extra/httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin ramesh@thegeekstuff.com
DocumentRoot "/usr/local/apache2/docs/thegeekstuff"
ServerName thegeekstuff.com
ServerAlias www.thegeekstuff.com
ErrorLog "logs/thegeekstuff/error_log"
CustomLog "logs/thegeekstuff/access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin ramesh@top5freeware.com
DocumentRoot "/usr/local/apache2/docs/top5freeware"
ServerName top5freeware.com
ServerAlias www.top5freeware.com
ErrorLog "logs/top5freeware/error_log"
CustomLog "logs/top5freeware/access_log" common
</VirtualHost>
3.) Verify VirtualHost Syntax using "httpd -S"
Should return this:
# /usr/local/apache2/bin/httpd -S
VirtualHost configuration:
Syntax OK
4.) Restart Apache:
# /usr/local/apache2/bin/apachectl restart
Link:
Last edited by Alex (5/06/2016 8:54 am)
Offline
Josh Philley
Configuring SSL Host Headers in IIS 8 and IIS 8.5
Last edited by soberbeacon (5/09/2016 9:23 am)
Offline
Offline
Bob Clarke
Currently following these directions to configure apache for the websites used earlier in the class.
=16pxThe tutorial, takes three domains and makes them all resolve to one Drupal directory on a web server. We confirmed the domains were pointed to the correct server, then we configured our Apache vhosts. We walked through the necessary steps for doing this on Ubuntu, which included creating a sites-available=16px file, adding the minimal vhost directives we needed, and then enabling the site. With the vhost configuration in place, we reloaded Apache to make sure it was properly reading the new configuration. After Apache reloaded, we went to our domain names in a browser and found a Drupal installation screen waiting for us.