LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-30-2007, 08:39 AM   #1
jlukensow
Member
 
Registered: Mar 2007
Posts: 33

Rep: Reputation: 15
Apache GUI config question


Hi,

I am using Red hat linux server, and when ever I use the HTTP GUI tool to config apache, after I hit save and restart, I get an error saying it cannot load a module. However, then to fix this, i just write over the config file with the back up, then restart apache, and everything works fine.

Does anyone know why this might be happening, is it easier to config the appache.conf file manually, or does anyone know of a good reference where i can look into this more?

And lastly, I want to set up apache to host 3 websites with one IP address. Can some please walk me through this. All the steps that are required to make this work.

Thanks,

James
 
Old 03-30-2007, 11:05 AM   #2
Biggen
Member
 
Registered: Sep 2004
Location: Panama City Beach FL
Distribution: Slackware 12.2
Posts: 199

Rep: Reputation: 31
What you are wanting to do is simple. I wouldn't even worry about using that GUI for this.

Not sure what version of Apache you are using but you simple need to setup Virtual Hosts in your httpd.conf file (or your vhosts.conf, depends on how Apache was installed and what version you have). You want name based virtual hosts which is multiple websites with one ip address. First off, the official documentation to set this up can be found here: http://httpd.apache.org/docs/2.2/vhosts/name-based.html .


Essentially you need three Virtual Host containers inside your httpd.conf file. Something like this:

Quote:
NameVirtualHost *:80

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

<VirtualHost *:80>
ServerName www.2nddomain.com
ServerAlias 2nddomain.com *.2nddomain.com
DocumentRoot /www/2ndomain
</VirtualHost>

<VirtualHost *:80>
ServerName www.3rddomain.com
ServerAlias 3rddomain.com *.3rddomain.com
DocumentRoot /www/3rddomain.com
</VirtualHost>
Of course substitue ServerName with your real www.whatever.com and substitute DocumentRoot to wherever your site files are (index.html, etc...)

Make sure to restart apache so that the changes take effect.

This should get you stated. Make sure and read the apache.org link above for some good info.

Last edited by Biggen; 03-30-2007 at 11:07 AM.
 
Old 04-01-2007, 10:15 AM   #3
jlukensow
Member
 
Registered: Mar 2007
Posts: 33

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Biggen
What you are wanting to do is simple. I wouldn't even worry about using that GUI for this.

Not sure what version of Apache you are using but you simple need to setup Virtual Hosts in your httpd.conf file (or your vhosts.conf, depends on how Apache was installed and what version you have). You want name based virtual hosts which is multiple websites with one ip address. First off, the official documentation to set this up can be found here: http://httpd.apache.org/docs/2.2/vhosts/name-based.html .


Essentially you need three Virtual Host containers inside your httpd.conf file. Something like this:



Of course substitue ServerName with your real www.whatever.com and substitute DocumentRoot to wherever your site files are (index.html, etc...)

Make sure to restart apache so that the changes take effect.

This should get you stated. Make sure and read the apache.org link above for some good info.

Right on, that is what i need, pretty simple, now that I got it working.

I still wonder why the GUI tool corrupts my file, why do you think that is happening. I guess it doesnt matter now, everything is working fine, which is what I need.

Thanks,

James
 
Old 04-01-2007, 12:20 PM   #4
Biggen
Member
 
Registered: Sep 2004
Location: Panama City Beach FL
Distribution: Slackware 12.2
Posts: 199

Rep: Reputation: 31
Quote:
Originally Posted by jlukensow
Right on, that is what i need, pretty simple, now that I got it working.

I still wonder why the GUI tool corrupts my file, why do you think that is happening. I guess it doesnt matter now, everything is working fine, which is what I need.

Thanks,

James
Dunno what is happening. You could always make backup of your current httpd.conf and then run the gui tool and let it create a new one and then compare the two to see what the problem is.

I've never used a GUI tool for apache. It has been my expierence that setting up Apache usually isn't TOO hard. It has it moments, but for the most part, most everything is done through the httpd.conf file and they did a pretty good job putting comments in there that describe the various features. Now getting modules to work.... That is a whole different story.... :-)
 
Old 01-16-2009, 04:43 PM   #5
Alel375
LQ Newbie
 
Registered: Jan 2009
Distribution: Ubuntu 8.04 64bit
Posts: 2

Rep: Reputation: 0
More info for new to Apache/Linux please

Quote:
Originally Posted by Biggen View Post
What you are wanting to do is simple. I wouldn't even worry about using that GUI for this.

Not sure what version of Apache you are using but you simple need to setup Virtual Hosts in your httpd.conf file (or your vhosts.conf, depends on how Apache was installed and what version you have). You want name based virtual hosts which is multiple websites with one ip address. First off, the official documentation to set this up can be found here: http://httpd.apache.org/docs/2.2/vhosts/name-based.html .


Essentially you need three Virtual Host containers inside your httpd.conf file. Something like this:



Of course substitue ServerName with your real www.whatever.com and substitute DocumentRoot to wherever your site files are (index.html, etc...)

Make sure to restart apache so that the changes take effect.

This should get you stated. Make sure and read the apache.org link above for some good info.
Not sure how to apply your answer to my situation. I am running Ubuntu 8.04 64 bit workstation with Gnome and Firefox 3. Set up an Apache server 2. To access this I have to use
Quote:
127.1.1.1
in Firefox and it selects a "default" index page. What I would like to do is to set it up so I can work on 3 websites locally to proof them before uploading them to their respective internet ISP hosts. If I can set up virtual hosts locally it would be great but I am unsure of what I would put in the URL names and IP number since the URLs already exist on the internet. I'm pretty new to Linux and Apache.
 
  


Reply

Tags
apache, apache2, config, hosts, local


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
config question about apache 1.3.34 youngstorm Linux - Software 3 03-10-2006 02:39 AM
PHP and Apache -- Config question j0217995 Slackware 4 11-05-2004 10:09 AM
apache 1.3 config question; default document? soliant Linux - Software 1 03-25-2004 11:50 AM
apache httpd.config question fibbi Linux - Software 4 10-18-2003 10:07 AM
Apache config question syphon00 Linux - Networking 2 09-06-2002 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration