2 sites points to same folder

Discussion in 'General' started by ergec, Jun 28, 2013.

  1. ergec

    ergec New Member

    I just installed a fresh server following exact same steps with this link


    everything went flawless and server works fine.

    this is a test server under university so I have two domains to test

    primary.uni.edu and secondary.uni.edu

    I setup server as primary.uni.edu

    by default apache runs under /var/www/html and shows my index file properly

    I created a site under ispconfig for primary.uni.edu so primary site now works under /var/www/primary.uni.edu -> /var/www/clients/client2/web3/

    I put my index file here and yes new setup works fine too

    then I created another site for secondary.uni.edu
    folder for this is /var/www/secondary.uni.edu -> /var/www/clients/client3/web4/

    Problem starts here, new account secondary.uni.edu shows ispconfig standart files using shell, which supposed to display ispconfig default page in browser


    instead secondary.uni.edu displays primary.uni.edu index file in browser.

    what might be the reason?

    I never had any problems or tweaks during installation and configuration.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    ensure that you dont mix * and IP's in website settings on your server. Either use * for both sites or the Ip for both sites.
  3. ergec

    ergec New Member

    tried both * and IP but no luck. btw when I just type IP in browser, same page opens (files under primary) does this mean something?
  4. ergec

    ergec New Member

    now we created a third domain and put and index.html saying "third one" and now all three domains primary secondary and third opens same "third" page

    what's going on I've no idea?!?!
  5. ergec

    ergec New Member

    Found the solution

    edit /etc/httpd/conf/httpd.conf

    at the end of the file I commented out these lines having ports

    #NameVirtualHost *:80
    #NameVirtualHost *:443
    Include /etc/httpd/conf/sites-enabled/

    then restarted apache. now all sites run under their folder

Share This Page