#1
  1. Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2004
    Location
    New Springfield, OH
    Posts
    1,236
    Rep Power
    1469

    Setting up Mirrored Domains in ISPConfig 3


    Pretty simple, really. I want two domain names to point to the same directory on the server. How on earth can I accomplish this in ISPConfig 3. Forwarding and mirroring do not work properly and adding a site does not allow you to specify a directory.

    If I manually edit the Apache config am I going to cause a cascade of problems?

    Of course I could also do symlinks, but then I'm still circumventing the system I'm supposed to be using to manage this stuff.

    (As a side note, how is ISPConfig any easier than managing the server yourself? Nothing about this works out-of-box.)
    Last edited by Nilpo; March 4th, 2013 at 04:11 PM.
    Don't like me? Click it.

    Scripting problems? Windows questions? Ask the Windows Guru!

    Stay up to date with all of my latest content. Follow me on Twitter!

    Help us help you! Post your exact error message with these easy tips!
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,448
    Rep Power
    4539
    I use ispconfig3 internally and it works well for me. What version of ispc3? 3.0.5 is current I think.

    I've never found the need to ever edit the main httpd configuration file. You can add per-site apache and php directives via ispc3, or use .htaccess to do redirects.

    I'm not sure I totally understand what you're trying to do, but take a look at the redirects tab in your site options and/or domain aliases. I never got a copy of their manual myself but there is a pretty comprehensive user manual available, the only problem is they want a few bucks for the manual. There are active and helpful forums for ispconfig3, you might try asking there. I've never messed around with mirroring or multiple servers with ispc3.

    Personally, I wouldn't consider reverting to using manual setups for my internal and self-hosted websites.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2004
    Location
    New Springfield, OH
    Posts
    1,236
    Rep Power
    1469
    Originally Posted by Doug G
    I use ispconfig3 internally and it works well for me. What version of ispc3? 3.0.5 is current I think.

    I've never found the need to ever edit the main httpd configuration file. You can add per-site apache and php directives via ispc3, or use .htaccess to do redirects.

    I'm not sure I totally understand what you're trying to do, but take a look at the redirects tab in your site options and/or domain aliases. I never got a copy of their manual myself but there is a pretty comprehensive user manual available, the only problem is they want a few bucks for the manual. There are active and helpful forums for ispconfig3, you might try asking there. I've never messed around with mirroring or multiple servers with ispc3.

    Personally, I wouldn't consider reverting to using manual setups for my internal and self-hosted websites.
    I'm running 3.0.4.6. I thought it was the most recent version, but they must have had a new release in the last few days.

    I did purchase the manual. I've also looked into redirects and aliases, neither let me do what I'm trying to accomplish.

    I want to have domain1.com and domain2.com both point to the same /var/www/clients/client1/web1/web

    As it is now, you end up with two different directories:
    /var/www/clients/client1/web1/web
    /var/www/clients/client1/web2/web

    Currently I deleted the second one and created a symlink back to the first. But that's circumventing the system. Doesn't ISPConfig offer a way to specify the directory a domain is associated with?

    On a side note. Do you know of a plugin that will allow you to use intelligent directory structures? This is damn archaic. It would be so much better if it looked like this:
    /var/www/clients/client1/domain.com/web

    It would be even better if it let you specify your own structure. (And database naming is ridiculous.)
    Last edited by Nilpo; March 5th, 2013 at 12:46 PM.
    Don't like me? Click it.

    Scripting problems? Windows questions? Ask the Windows Guru!

    Stay up to date with all of my latest content. Follow me on Twitter!

    Help us help you! Post your exact error message with these easy tips!
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,448
    Rep Power
    4539
    This probably isn't the proper forum for an ispc3 discussion, since nothing is really DNS related, but here goes anyway.

    If you have root access to your ispc3 server you can run ispconfg_update.sh to updated your ispconfig

    On a side note. Do you know of a plugin that will allow you to use intelligent directory structures? This is damn archaic. It would be so much better if it looked like this:
    /var/www/clients/client1/domain.com/web
    A domain name symlink is auto created in /var/www/domain.com/ that points to /var/www/clients/clientX/webX

    I'm not sure what you mean by database naming. I have my server set to prepend c[CLIENTID] but if you remove the prefix in System - Interface I think you can then name your db whatever you want.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  8. #5
  9. Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2004
    Location
    New Springfield, OH
    Posts
    1,236
    Rep Power
    1469
    Originally Posted by Doug G
    This probably isn't the proper forum for an ispc3 discussion, since nothing is really DNS related, but here goes anyway.

    If you have root access to your ispc3 server you can run ispconfg_update.sh to updated your ispconfig

    A domain name symlink is auto created in /var/www/domain.com/ that points to /var/www/clients/clientX/webX

    I'm not sure what you mean by database naming. I have my server set to prepend c[CLIENTID] but if you remove the prefix in System - Interface I think you can then name your db whatever you want.
    I'm with you. I updated as soon as you mentioned a newer version. Good there.

    Also stumbled upon the directory naming symlinks. I found where you can now change the directory structure using the ISPConfig variables. I swapped [clientid] for [clientname] and got mostly what I was looking for. Same for the database names.

    It's the domain pointing that is a problem now. Although I did see where you can add Apache snippets. I have to dig a little to see if it supports vhost directives. Personally it all seems like a pain in the backside. Right now I have it working with the symlink.

    I needed to have two domains pointing to the exact same web root. I'm using an .htaccess file to route traffic based upon the HTTP_HOST. Without ISPConfig, I would have just added an Apache virtual host and been done. But this works too. It just seems like there should be a way to do this from within ISPConfig. It seems like such an oversight that they don't allow you to set a custom directory when setting up a domain. Forwarding should have been the answer, but it didn't seem to work for me on the first go-round. I may visit that again and see if I missed something.
    Don't like me? Click it.

    Scripting problems? Windows questions? Ask the Windows Guru!

    Stay up to date with all of my latest content. Follow me on Twitter!

    Help us help you! Post your exact error message with these easy tips!
  10. #6
  11. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,448
    Rep Power
    4539
    I needed to have two domains pointing to the exact same web root. I'm using an .htaccess file to route traffic based upon the HTTP_HOST.
    Disclaimer: I'm a self-taught ispconfig user. I thought Alias Domain would do exactly this? Maybe not, though, I've never used same. Anyway, here's some stuff I've discovered about ispc3 over the last few years of use.

    Changes you make in the ispc3 interface are not immediate, there is an every-minute cron job that does the actual work to change the appropriate configuration files.

    I run ispconfig3 on Fedora 15, so paths may differ on your system. In addition, I don't use DNS through ispc3, I use external DNS servers for public domains and a windows domain server for internal DNS.

    Fedora by default uses modular apache configuration files in /etc/httpd/conf.d/ so you really never need to touch httpd.conf. ispc3 creates modular vhost files per site in /etc/httpd/conf/sites-enabled/ which is where you'll find the site vhost settings, and these files are modified by user directives set via the ispc3 interface.

    I use fast-cgi with suExec for my internal sites (mostly), and the fastcgi starter scripts are found in /var/www/php-fcgi-scripts/ This setup allows for per-site php.ini files which ispc3 puts in /var/www/conf/<site>

    I also jailkit each site shell user account.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  12. #7
  13. Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2004
    Location
    New Springfield, OH
    Posts
    1,236
    Rep Power
    1469
    Great minds think alike?

    Trade your Fedora 15 for CentOS 6.3 and we're rocking the same setup. I'm using external DNS for all of my own domains. (Although I will probably use ISPConfig for handling client DNS. Who wants to keep track of all those 3rd party sites?) I'm also using Fast CGi with suExec and jailkit. I also elected to use Dovecot.

    Everything is running smoothly now. I just swapped out Squirrelmail for Roundcube. I sort of made a well-intentioned stupid move. I set it up to use HTTPS for webmail access to avoid plain text transfer...and now I'm getting certificate errors because each domain has its own webmail url. I've got to reroute all the /webmail urls back to a central domain with a proper SSL cert now.

    Now that I've updated, I'm going to go back and play with the alias and forwarding to try and figure that out. In the meantime, the symlink is working like a charm.

    I've also got dual IPs to my server so I'm probably going to install Lighttpd as well and manage it independently. Down the road I'll probably use it to serve static content or something.

    In any case, thanks for your help and insight!
    Don't like me? Click it.

    Scripting problems? Windows questions? Ask the Windows Guru!

    Stay up to date with all of my latest content. Follow me on Twitter!

    Help us help you! Post your exact error message with these easy tips!
  14. #8
  15. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,448
    Rep Power
    4539
    I'm glad you got things running smoother. You'll know more about ispc3 than me in a couple days, I suspect.

    ispconfig doesn't support Fedora beyond F15, probably because of all the "leading-edge" changes Fedora made with F16 and up. The ispc3 guys are Debian types, I'm getting ready to build a new ispc3 server on a Debian VM. Fedora 15 is no longer updated.

    One more tidbit, the latest ispc3 sets the "immutable" bit on site directories. I usually make a site top-level directory, and had to do some research when as root I kept getting mkdir "permission denied"
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  16. #9
  17. Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2004
    Location
    New Springfield, OH
    Posts
    1,236
    Rep Power
    1469
    Originally Posted by Doug G
    I'm glad you got things running smoother. You'll know more about ispc3 than me in a couple days, I suspect.

    ispconfig doesn't support Fedora beyond F15, probably because of all the "leading-edge" changes Fedora made with F16 and up. The ispc3 guys are Debian types, I'm getting ready to build a new ispc3 server on a Debian VM. Fedora 15 is no longer updated.

    One more tidbit, the latest ispc3 sets the "immutable" bit on site directories. I usually make a site top-level directory, and had to do some research when as root I kept getting mkdir "permission denied"
    Ooh. Nice heads up. That one would have got me!
    Don't like me? Click it.

    Scripting problems? Windows questions? Ask the Windows Guru!

    Stay up to date with all of my latest content. Follow me on Twitter!

    Help us help you! Post your exact error message with these easy tips!

IMN logo majestic logo threadwatch logo seochat tools logo