Would subfolders pointing to a diff domain conflict with ISPconfig installation?

October 15, 2015 2.2k views
Apache DigitalOcean Ubuntu

Good Morning,

I have a question regarding, ISPconfig, I followed through the tutorial (https://www.digitalocean.com/community/tutorials/how-to-install-ispconfig3-on-an-ubuntu-14-04-server), it's up and running.

Unfortunately, i didn't make this installation on a blank droplet, i used my old one
which was modified to take subfolders domain (EX: site1.com /www/site1.com and site2.com /www/site2.com).

My configuration is something similar to this:

<VirtualHost *:80>
    DocumentRoot /var/www/site1.com
    ServerName www.site1.com
    ServerAlias site1.com

<VirtualHost *:80>
    DocumentRoot /var/www/site2.com
    ServerName www.site2.com
    ServerAlias site2.com

apache2.conf :
ServerName www.site1.com 
ServerName www.site2.com 

Problems are the following, and I don't know which way to go about it,

First, should i add my server.site1.com subdomain to apache2.conf and 000-default.conf? The only reason why i used subdomain was because tutorial did, should i just point to www. domain?

Second, the site2.com, Should I erase it from my apache configuration files and let ISPconfig recreate the configuration by adding a new user and site?

Third, I am able to login to panel using either domain, is there a way to only allow to access panel through site1.com:8080? instead of both.

Thanks for the help and recommendations!
Digital Ocean Rocks \m/

1 Answer

First of all it is not a good idea to setup ISPConfig on a server that already has services running and configured, but you already knew this. From your question you understand you have manually added the VHOSTs for site1.com and site2.com.
If you haven't got any connection problems, this isn't a big deal. You can keep this configuration and just add new domains/sites threw ISPConfig. ISPConfig will not touch the default VHOST, it only creates new configurations with the same name as the domain of the site.

Ofcourse if you want to organize everything, and keep it all managed at one point; best thing would be to remove the site from your VHOST files and backup and remove the site folders. After this you can re-create it threw ISPConfig.

To change the control panel domain, you can edit the ispconfig.vhost file.

Have another answer? Share your knowledge.