Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th October 2005, 03:40
Vorlon Vorlon is offline
Junior Member
 
Join Date: Oct 2005
Location: West Grove, PA
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default Where to Start with Apache2?

I've been a long time user of Apache, even to the point of hosting virtual domains on my public web server, but I am at a loss how to configure apache2 that loaded with my Debian 3.1 Sarge setup.

All the "tutorials" I've found are beyond me. Can somebody point me to a good beginner tutorial for Apache2?

Alternately, can someone tell me where the heck is the default home page is stored???

Thanks!
Reply With Quote
Sponsored Links
  #2  
Old 19th October 2005, 09:48
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Quote:
Originally Posted by Vorlon
Alternately, can someone tell me where the heck is the default home page is stored???
It's in /var/www.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 20th October 2005, 02:12
themachine themachine is offline
Senior Member
 
Join Date: Oct 2005
Location: Texas, USA
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Yes, as falko mentioned, usually this is what you'll have for a default setup:

/var/www/apache2-default => default web docs dir

/etc/apache2 => apache config files

/etc/apache2/apache2.conf => main apache configurations

/etc/apache2/sites-available => Contains your virtual hosts, which are not enabled by default. 'default' is usually there. I generally copy this file to another file for each vhost, and then edit it (be sure to remove the 'NameVirtualHost = w.x.y.z' from the vhost files (you only want it once in the default config file). The default vhost file generally has all the basic information you need in order to copy, and setup seperate vhosts.

/etc/apache2/sites-enabled => You create symlinks here, to the files in /etc/apache2/sites-available. Usually, you will see that '000-default' is the symlink back to '/etc/apache2/sites-available/default'. If you don't have the link here, apache doesn't read it. For example, if your vhost file is '/etc/apache2/sites-available/web1.example.com' then you need to execute the following command:

Code:
# ln -s /etc/apache2/sites-available/web1.example.com /etc/apache2/sites-enabled/web1.example.com
/etc/apache2/mods-available => This is the home for your apache2 modules (hint: do a search like so 'apt-cache search libapache2-mod').

/etc/apache2/mods-enabled => This directory again holds symlinks to the actually mods in /etc/apache2/mods-available. Apache will *not* load any mods that are not symlinked in this dir.

If you want mod-php4 enabled, you need to first install it, and then enable it:

Code:
# apt-get install libapache2-mod-php4

# ln -s /etc/apache2/mods-available/php4.load /etc/apache2/mods-enabled/php4.load

# ln -s /etc/apache2/mods-available/php4.conf /etc/apache2/mods-enabled/php4.conf
---

Note: There is a 'Redirect' directive in your default apache2 vhost file which sends the request to '/apache2-default'. Therefore if you edit the default file instead of creating a different vhost file, you will need to remove this directive.

Ideally, you would probably want to set up your vhost web docs dir like '/var/www/web1', '/var/www/web2'.

Personally, I lay mine out like so:

/var/www

===> /var/www/web1
======> /var/www/web1/cgi-bin
======> /var/www/web1/htdocs
======> /var/www/web1/logs

===> /var/www/web2
...

I find it keeps everything organized nicely... If you have any further question, please let me know... perhaps I could write up a basic beginner how to tonight.

[dierkes.themachine]

Last edited by themachine; 22nd November 2005 at 17:43.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HowTo start developing ISPConfig till Developers' Forum 18 25th April 2014 21:43
normal HTTPD wont start traxxdata Installation/Configuration 4 1st February 2008 18:23
start again from scratch with ispconfig - how? Ovidiu General 1 19th September 2005 12:05
proftpd does not start after ip-adress updates fuban Installation/Configuration 1 5th September 2005 12:23
How to make it start automatically after system reset? KenMcGinnis Installation/Configuration 3 8th August 2005 13:25


All times are GMT +2. The time now is 16:28.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.