ispCP - Board - Support
add custom server alias to apache config - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: System Setup & Installation (/forum-32.html)
+--- Thread: add custom server alias to apache config (/thread-6855.html)



add custom server alias to apache config - soomon - 06-01-2009 04:49 AM

hey guys,

I have ispcp 1.0 running on my server with some websites.
i now want to access some of them via my vpn connection to my server so i have a secured connection.
so i added the site name i want it to be accessible at (site.abc) to /etc/apache2/sites-available/ispcp.conf at the part of that website:

ServerAdmin webmaster@abc.de
DocumentRoot /var/www/virtual/abc.de/htdocs

ServerName abc.de
ServerAlias http://www.abc.de abc.de *.abc.de site.abc <--

Alias /errors /var/www/virtual/abc.de/errors/

but after a reaload accessing the site only shows:

Not Found
The requested URL / was not found on this server.

i added site.abc to my windows hosts file.

ports.conf sais:
Listen 80
Listen 443

but wheres my mistake?
or do i have to create a new file and copy everything of that domain but with only that one server name and alias ?

thanks & greets,
soomon


RE: add custom server alias to apache config - kilburn - 06-02-2009 05:47 PM

Quote:i now want to access some of them via my vpn connection to my server so i have a secured connection.

I suppose that when accessing the server through your vpn, you do so using a different (internal) IP. As you can see on the ispcp.conf you quoted, the <VirtualHost ...> directive is limited to a single IP which is not the one used in the VPN.

If this is the case, you should create a new <VirtualHost ...> configuration file (/etc/apache2/sites-enabled/vpnhost.conf or something like this) that is almost the same as the public one, but changing the IP.

Hope it helps...


RE: add custom server alias to apache config - soomon - 06-02-2009 06:41 PM

hi,

yeah i guess that'll do it.

thank you!