Nuts & Bolts for any eCommerce site
How it all comes together
Heres what you are looking for

ISPConfig Default Website

Share on facebook
Share on twitter
Share on reddit
Share on linkedin

I’m not the local Linux GURU by far, but we have an internal CentOS machine running ISPConfig that hosts a couple of our internal sites running on Linux. I wanted to set up a parked domain project that we could point any domains we were not using to and serve ads and offer the domains for sale. So I got the site going, but I needed ISPConfig to default to that site whenever a domain hit the server and was not actually set up. You would think something like this would just be built in. Anyone using this as a host would want sites they turned off to load a splash page or something. However ISPConfig/Apache’s default is to just load the first site it comes to, which ends up being alphabetically since they are in the conf directory like that. So for us that was our internal bug tracking site-not what I wanted at all.

I found several posts talking about using a redirect or modifying httpd.conf and adding

DocumentRoot /www/docs/
ErrorLog logs/
CustomLog logs/ common

I couldn’t seem to get this to work, and I really wanted to do this myself instead of having to lean on Cory, our real Linux GURU.

The package I’m using is called D-Park Pro. It was cheap enough I tried it despite the random bad reviews I could find. It lets me set up the individual site so I can make the content unique for each parked domain. It works great.

Anyhow the point of telling you that was that I realized inside /etc/httpd/conf/sites-available, the individual vhost file for my intended target had several aliases in it that D-Park creates as I add sites to it. I then noticed inside httpd.conf there is an include line that includes the entire sites-available folder.

I simply included the vhost file of the site I wanted to load so that it is the first site. So inside my http.conf file, I originally had:

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

I changed it to:

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

If you notice all I did was insert the include for my preferred first target host file before the original include. Works perfectly!

Source: Skynet Solutions

By: Jed Parmenter

More Articles

3D Printing

3D Printing Services in Tulsa

Skynet Solutions now offers 3D printing services. Wait…what? That seems awkward but let me explain. Skynet Solutions has owned a 3D printer since 2011. With an interest in the 3d

Read More »

Need eCommerce web support?

Give us a shout today! We won't bite.....hard.