Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-30-2007, 08:39 AM
|
#1
|
Member
Registered: Mar 2007
Posts: 33
Rep:
|
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
|
|
|
03-30-2007, 11:05 AM
|
#2
|
Member
Registered: Sep 2004
Location: Panama City Beach FL
Distribution: Slackware 12.2
Posts: 199
Rep:
|
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.
|
|
|
04-01-2007, 10:15 AM
|
#3
|
Member
Registered: Mar 2007
Posts: 33
Original Poster
Rep:
|
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
|
|
|
04-01-2007, 12:20 PM
|
#4
|
Member
Registered: Sep 2004
Location: Panama City Beach FL
Distribution: Slackware 12.2
Posts: 199
Rep:
|
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.... :-)
|
|
|
01-16-2009, 04:43 PM
|
#5
|
LQ Newbie
Registered: Jan 2009
Distribution: Ubuntu 8.04 64bit
Posts: 2
Rep:
|
More info for new to Apache/Linux please
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.
|
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 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.
|
|
|
All times are GMT -5. The time now is 07:00 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|