Weblog entry #28 for Grimnar
Installing Debian went like a dream, all up to the point when I was about to install apache.
Which one to install? 1.3 og 2.2.3?
Of course, I installed both. The confusion was total. Wich php to go with this? php4 or php5?
I stopped the 1.3-server and figured I should take a step into the future and run apache 2.2.3 and learn how that works.
But holy sh** was I in for surprise. Now, I been working with apache 1.3 for about 4 years. But I cannot for the life of me get this to work. What the hell is up with this?
Why is there several folders such as sites-enabled and sites-available? Wich one should I edit to make them work? (yeah, I runned the a2ensite)
Perhaps apache2 is really made to run from a web based program?
I finally found the a2enmod php4/php5 - and thought that would make php work on my sites, but of course I was wrong. No I get a download popup asking me to download x-httpd-php. That makes it clear that php is not working.
I´ve been googling like a fanatic the last couple of days to find some starting guides and howtoôs - but nothing.
1. I got a mainpage with no php on it right now, just index.html just to get it working. But I still get the php error. Even I checked everywhere and the DocumentRoot points to a folder wich have NO *.php in it.
2. Should I go back to apache 1.3? The sites I´m serving is really only galleries and light stuff like that. Is there a need for apache2? Or should I be prepared for the future and stick with apache2 and learn it once and for all?
Comments on this Entry
[ Send Message | View Steve's Scratchpad | View Weblogs ]
We did cover this in the past in this article. In short you place your site information in sites-available - then if you want to enable the site you symlink that into sites-enabled.
(ie. Apache only reads things from sites-enabled and modules-enabled - this allows you to have sites which are disabled and modules which are disabled and you can use the new commands to turn them on and off with ease.)
In short I'd suggest you stick with Apache2. It is the way of the future and many many things are more simple with it.
If you have more specific questions, or confusion, after reading that introduction please do tell us what they are and we'll try to help..,
[ Parent | Reply to this comment ]
I will come back later with more experience on apache2. I need to upload about 50gb backup before letting the server go live anyway.
But as for now it is the php that is bothering me, It will not work. Do I have to enable php-support in the vhost snippets as well?
[ Parent | Reply to this comment ]
You need the libapache bit to get the integration (I kind of think you do from the comment on a2enmod - but just to be sure .....)
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
aptitude install libapache2-mod-php5
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Don't use PHP4 or Apache 1, as every time you do another free software developers heart is broken.
Did you restart Apache after enabling modules?
The config works pretty much like Apache 1.3, except they broke it into separate files, so that they can add and remove stuff easily. The /etc/apache2/apache2.conf just includes the other files, to make one big horrid linear configuration file.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
NameVirtualHost *
ServerAdmin webmaster@localhost
DocumentRoot /var/www/server.tld
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
And this is a vhost-container:
ServerName vhost.server.tld
ServerAdmin ivar@lynweb.net
DocumentRoot /home/user/webfolder
IndexOptions FancyIndexing
ErrorLog /var/log/apache2/error_vhost.log
Now, whever I try to access the vhost I only get the 000-default page. grr!:)
[ Parent | Reply to this comment ]
http://www.debian-administration.org/articles/285
Before any webdav is applied.
I have "NameVirtualHost ip.ad.re.ss" in /etc/apache2/apache2.conf just before it includes the available sites I tried a configuration with "NameVirtualHost *" in the other day, but gave up when Apache insisted on moaning about me covering some of the other IP addresses with other hosts (but maybe our config is just too complex for my brain).
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
At least it isn't 1994 (it's 2007), this isn't AIX (it's Debian), and you don't have Apache v0.94 (it's v2.2x and built into apt-get repos) to try and compile from scratch with no previous How-Tos available ... :]
But, honestly, I feel your pain -- the best advice is relax and like previously mentioned watch the error logs and Google Google Google.
O'd to the days of gopher ...
-Sx-
http://youve-reached-the.endoftheinternet.org/
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Remove everything apache and php related with 'aptitude purge' and start over.
[ Parent | Reply to this comment ]