Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Linux and Unix
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop drivers dvd email error excel excel 2003 firefox hard drive hardware hdmi hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem processor recovery router safe mode screen slow sound spyware tdlwsp.dll trojan video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Apache2 Web Server

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
AKA Arizona's Avatar
Computer Specs
Distinguished Member with 2,913 posts.
 
Join Date: Jul 2003
Location: Mississippi South of Mason Dixion
Experience: Computer & Web Design Engineer
09-Dec-2005, 12:38 PM #1
Apache2 Web Server
I did a search and did not find exactly what I was looking for:

I have Kwrite open looking at my http.conf file

# This is here for backwards compatability reasons and to support
# installing 3rd party modules directly via apxs2, rather than
# through the /etc/apache2/mods-{available,enabled} mechanism.
#
#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so

and my ports.conf has

Listen 80

my question is how and where do I put my information to allow my port 80 redirect my router redirects to 192.168.1.87 and my eth0 is set the same, to open my web sites www.akaarizona.com www.gadgetinc-ms.com www.ihim.us www.castawaypools.com www.ecocleancarpets.com and several others they are on a second hdd /mnt/hdc1

And I need an ftp service
__________________
Deputy Däve C.A.R.NREMT
Certified Accident Reconstructionist
Nationaly Registered EMT

If I helped you please support TSG, just click here Affero Link............................

I've done so much with so little for so long, I can do almost anything with nothing at all............ Deputy Dave

Before you can have an average, you must first have an Extreme, I am working on the Extreme.............Deputy Dave

Last edited by AKA Arizona : 09-Dec-2005 12:52 PM.
linuxphile's Avatar
Administrator with 413 posts.
 
Join Date: Mar 2003
Location: MD
Experience: Intermediate
09-Dec-2005, 01:07 PM #2
If I understand correctly, you have added the port 80 redirection to your router so that port 80 requests are going to the Mepis machine. And what you are asking for now is how to get apache to serve up those domains, which are stored on a separate hard drive?

You will probably use VirtualHost declarations in your httpd.conf file. VirtualHosts allow you to configure apache to serve up different domains from different directories.

Here is an excerpt from my httpd.conf with the relavent VirtualHost declarations:

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /var/www/html/
Servername www.linuxphile.org
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /var/www/html/fairytale
Servername subdomain.linuxphile.org
</VirtualHost>


I recommend reading up on this at http://httpd.apache.org/docs/2.0/vhosts/examples.html
__________________
http://linuxphile.org
A lust for linux.
AIM: alustforlinux
AKA Arizona's Avatar
Computer Specs
Distinguished Member with 2,913 posts.
 
Join Date: Jul 2003
Location: Mississippi South of Mason Dixion
Experience: Computer & Web Design Engineer
09-Dec-2005, 01:17 PM #3
OK so after the

# This is here for backwards compatability reasons and to support
# installing 3rd party modules directly via apxs2, rather than
# through the /etc/apache2/mods-{available,enabled} mechanism.
#
#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /mnt/hdc1/websites/akaaz/
Servername www.akaarizona.com
</VirtualHost>

and so on until I have all website listed
__________________
Deputy Däve C.A.R.NREMT
Certified Accident Reconstructionist
Nationaly Registered EMT

If I helped you please support TSG, just click here Affero Link............................

I've done so much with so little for so long, I can do almost anything with nothing at all............ Deputy Dave

Before you can have an average, you must first have an Extreme, I am working on the Extreme.............Deputy Dave
linuxphile's Avatar
Administrator with 413 posts.
 
Join Date: Mar 2003
Location: MD
Experience: Intermediate
09-Dec-2005, 02:09 PM #4
Correct, and after all the edits you'll need to restart Apache. You should of course make a backup copy of your httpd.conf prior to making any edits.
AKA Arizona's Avatar
Computer Specs
Distinguished Member with 2,913 posts.
 
Join Date: Jul 2003
Location: Mississippi South of Mason Dixion
Experience: Computer & Web Design Engineer
09-Dec-2005, 02:23 PM #5
ok now you raised a new question how do I stop then restart apache?
linuxphile's Avatar
Administrator with 413 posts.
 
Join Date: Mar 2003
Location: MD
Experience: Intermediate
09-Dec-2005, 02:27 PM #6
I believe these will work for you:

/etc/init.d/apache restart
/etc/init.d/apache stop
/etc/init.d/apache start
Squashman's Avatar
Distinguished Member with 14,983 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: IIAHYAYCESA,YAADA!
09-Dec-2005, 02:35 PM #7
Since you are running Linux, I would suggest you run OpenSSH server. People can do secure connection to your server then to transfer files. Otherwise I suggest you use VSFTPD if you don't want to go the Secure Shell Server route.
AKA Arizona's Avatar
Computer Specs
Distinguished Member with 2,913 posts.
 
Join Date: Jul 2003
Location: Mississippi South of Mason Dixion
Experience: Computer & Web Design Engineer
09-Dec-2005, 02:37 PM #8
OK I thought of one more, not all of my home pages are called index.htm or .html would I have to be specific on this line: DocumentRoot /mnt/hdc1/websites/akaaz/akaaz.html or is there something different I need to do?
linuxphile's Avatar
Administrator with 413 posts.
 
Join Date: Mar 2003
Location: MD
Experience: Intermediate
09-Dec-2005, 02:40 PM #9
You'll need a global directive:
DirectoryIndex index.html index.htm index.html.var index.cgi index.php

Put them in the order of precedence. http://httpd.apache.org/docs/2.0/mod...directoryindex has more info on this.
Squashman's Avatar
Distinguished Member with 14,983 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: IIAHYAYCESA,YAADA!
09-Dec-2005, 02:43 PM #10
There is a line in your httpd.conf file that says directory index. On this line you put what files you want. I usually change mine to default.html instead of index.html just because I like to be different.

DirectoryIndex default.html default.htm default.shtml default.php default.php4 default.php3 default.phtml default.cgi
__________________
I hate asking the same question twice!
How to ask questions the smart way!
Microsoft MVP - User Desktop Experience
AKA Arizona's Avatar
Computer Specs
Distinguished Member with 2,913 posts.
 
Join Date: Jul 2003
Location: Mississippi South of Mason Dixion
Experience: Computer & Web Design Engineer
09-Dec-2005, 02:47 PM #11
so my httpd.conf would look like this:

# This is here for backwards compatability reasons and to support
# installing 3rd party modules directly via apxs2, rather than
# through the /etc/apache2/mods-{available,enabled} mechanism.
#
#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /mnt/hdc1/websites/akaaz/
DirectoryIndex akaarizona.html
Servername www.akaarizona.com
</VirtualHost>
__________________
Deputy Däve C.A.R.NREMT
Certified Accident Reconstructionist
Nationaly Registered EMT

If I helped you please support TSG, just click here Affero Link............................

I've done so much with so little for so long, I can do almost anything with nothing at all............ Deputy Dave

Before you can have an average, you must first have an Extreme, I am working on the Extreme.............Deputy Dave
linuxphile's Avatar
Administrator with 413 posts.
 
Join Date: Mar 2003
Location: MD
Experience: Intermediate
09-Dec-2005, 02:48 PM #12
You can put it inside the VirtualHost directives, but you could also make it global by placing it above the NameVirtualHost *:80 directive.
AKA Arizona's Avatar
Computer Specs
Distinguished Member with 2,913 posts.
 
Join Date: Jul 2003
Location: Mississippi South of Mason Dixion
Experience: Computer & Web Design Engineer
09-Dec-2005, 03:07 PM #13
I stopped and started Apache2 and got this error for every website

[Fri Dec 09 14:02:52 2005] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Fri Dec 09 14:02:52 2005] [warn] NameVirtualHost *:80 has no VirtualHosts

This is my httpd.conf file:

# This is here for backwards compatability reasons and to support
# installing 3rd party modules directly via apxs2, rather than
# through the /etc/apache2/mods-{available,enabled} mechanism.
#
#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so
#
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /mnt/hdc1/websites/AKAAZ/
DirectoryIndex akaarizona.html
Servername www.akaarizona.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /mnt/hdc1/websites/GADGET/gflash/
DirectoryIndex gflash.htm
Servername www.gadgetinc-ms.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /mnt/hdc1/websites/IHIM/
DirectoryIndex ihim.htm
Servername www.ihim.us
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /mnt/hdc1/websites/castaway/
DirectoryIndex castaway.htm
Servername www.castawaypools.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /mnt/hdc1/websites/ccleaner/
DirectoryIndex index.htm
Servername www.ecocleancarpets.net
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /mnt/hdc1/websites/PCSO/
DirectoryIndex index.html
Servername www.prentisscountysheriff.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /mnt/hdc1/websites/downinmexico/
DirectoryIndex downinmexico.html
Servername www.downinmexico.net
</VirtualHost>
__________________
Deputy Däve C.A.R.NREMT
Certified Accident Reconstructionist
Nationaly Registered EMT

If I helped you please support TSG, just click here Affero Link............................

I've done so much with so little for so long, I can do almost anything with nothing at all............ Deputy Dave

Before you can have an average, you must first have an Extreme, I am working on the Extreme.............Deputy Dave
linuxphile's Avatar
Administrator with 413 posts.
 
Join Date: Mar 2003
Location: MD
Experience: Intermediate
09-Dec-2005, 03:13 PM #14
Hrm. That's worked for me but I've also got my Listen 80 directive in my httpd.conf file, not a separate file. You can try changing the NameVirtualHost directive to:
#Replace 192168.X.X with the IP of your server.
NameVirtualHost 192.168.X.X

#Then Replace the <VirtualHost *:80> with (again replace 192.168.X.X with your server's IP)
<VirtualHost 192.168.X.X>
__________________
http://linuxphile.org
A lust for linux.
AIM: alustforlinux
AKA Arizona's Avatar
Computer Specs
Distinguished Member with 2,913 posts.
 
Join Date: Jul 2003
Location: Mississippi South of Mason Dixion
Experience: Computer & Web Design Engineer
09-Dec-2005, 03:22 PM #15
before I run with this further, my server is not connected to the location it will run from. I am at work the server will be at home, does that make a difference?
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 07:30 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.