HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Feature Requests (http://www.howtoforge.com/forums/forumdisplay.php?f=17)
-   -   Virtual Host for Shared IP (http://www.howtoforge.com/forums/showthread.php?t=203)

Tribal-Dolphin 6th August 2005 10:10

Virtual Host for Shared IP
 
Create a virtual host Apache for the IP having several sites to avoid that the access by IP shows the first created site.

Something like that :
Code:


NameVirtualHost 192.168.1.2:80
NameVirtualHost 192.168.1.2:443

 <VirtualHost 192.168.1.2:80>
ServerName shared.domain
DocumentRoot /var/www/sharedip
User www-data
Group www-data
</VirtualHost>

 <VirtualHost 192.168.1.2:443>
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
ServerName shared.domain
DocumentRoot /var/www/sharedip
User www-data
Group www-data
</VirtualHost>

and create a simple index.html file into the directory to display :
This IP is a shared IP. You can access to the requested website by typing the URL instead of IP in your favorite browser.

falko 6th August 2005 14:56

That's a good idea! :)

Tribal-Dolphin 24th October 2005 21:39

I'm realising this and i've a question :

Does the function make_vhost($server_id) in lib/config.lib.php rewrite all the Vhosts_ispconfig.conf file ?

Thanks.

till 24th October 2005 21:55

Yes, it rewrites the complete file. And yes, this may need to be a bit optimized ;)


All times are GMT +2. The time now is 17:58.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.