Click to See Complete Forum and Search --> : Getting Apache2 to work with Debian Sid, anyone?
sk545
12-12-2003, 06:25 PM
I am unable to get apache2 to work properly in Debian Sid and searches on google come up empty. All i did was 'apt-get install apache2xx' which went fine. Afterwards, i am just lost. They seem to have changed a lot of things around. Also, seems to me that its very poorly documented in Sid. So, anyone know how to get it going? I don't need SSL, just a basic webserver. Currently i am in apache 1.3.x and can get that to work.
Thanks.
sharth
12-12-2003, 06:33 PM
try this...
apt-get install apache2-mpm-prefork
I use apache2-mpm-threadpool (no problems yet :) )
sk545
12-13-2003, 02:12 PM
yeah, thats the one i had installed with apt. The question is, what do i do afterwards? Is there a newbie guide anywhere for it?
Thanks.
sk545
12-13-2003, 03:28 PM
Ok, i kinda got it to work. It starts and stops fine without a error. However, when try to access it through a browser with http://localhost or http://ip-address, i get this:
Not Found
The requested URL / was not found on this server.
In /var/log/apache2/error.log, i get:
Sat Dec 13 14:12:02 2003] [error] [client 209.6.184.172] File does not exist: /htdocs
[Sat Dec 13 14:12:02 2003] [error] [client 209.6.184.172] File does not exist: /htdocs
[Sat Dec 13 14:12:03 2003] [error] [client 209.6.184.172] File does not exist: /htdocs
[Sat Dec 13 14:12:40 2003] [notice] caught SIGTERM, shutting down
[Sat Dec 13 14:14:50 2003] [notice] Apache/2.0.48 (Debian GNU/Linux) configured -- resuming normal operations
[Sat Dec 13 14:15:01 2003] [error] [client 127.0.0.1] File does not exist: /htdocs
[Sat Dec 13 14:15:01 2003] [error] [client 127.0.0.1] File does not exist: /htdocs, referer: http://localhost:81/
[Sat Dec 13 14:15:11 2003] [error] [client 209.6.184.172] File does not exist: /htdocs
[Sat Dec 13 14:15:11 2003] [error] [client 209.6.184.172] File does not exist: /htdocs, referer: http://209.6.184.172:81/
[Sat Dec 13 14:15:53 2003] [notice] caught SIGTERM, shutting down
[Sat Dec 13 14:24:27 2003] [notice] Apache/2.0.48 (Debian GNU/Linux) configured -- resuming normal operations
[Sat Dec 13 14:24:34 2003] [error] [client 127.0.0.1] File does not exist: /htdocs
[Sat Dec 13 14:24:34 2003] [error] [client 127.0.0.1] File does not exist: /htdocs, referer: http://localhost:81/
[Sat Dec 13 14:25:12 2003] [notice] caught SIGTERM, shutting down
What is this /htdocs?? Do i have to make one? Here is my directory settings in apache2.conf:
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
UserDir public_html
<Directory /home/me/apached>
AllowOverride FileInfo AuthConfig Limit
Options Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
Thanks.
sharth
12-14-2003, 02:45 AM
That won't matter. In deabin, apache2 defaults to using virtual hosts.
look in /etc/apache2/sites-enabled
sk545
12-15-2003, 01:17 PM
Is this how the /sites-enabled/default should look like?
NameVirtualHost 211.6.185.172:81
<VirtualHost 211.6.184.185:81>
ServerName "211.6.185.172:81"
ServerAdmin webmaster@localhost
DocumentRoot /var/www/apache2-default/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /icons/ "/usr/share/apache2/icons/"
<Directory "/usr/share/apache2/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I still get the error in error.log:
[Mon Dec 15 12:10:24 2003] [notice] Apache/2.0.48 (Debian GNU/Linux) configured -- resuming normal operations
[Mon Dec 15 12:11:15 2003] [error] [client 127.0.0.1] File does not exist: /htdocs
And the console says this too:
# /etc/init.d/apache2 start
Starting web server: Apache2apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Thanks.
sharth
12-15-2003, 10:30 PM
assuming that you have listen 81 in /etc/apache2/ports.conf
and that you want any access to 211.6.185.172:81 to access the webserver, it should be fine. I wouldn't worry too much about the error line in the error.log
on the servername, just add something in/etc/apache2/apache2.conf with the line
servername <your domain name or ip address if you don't have one>
for me, its...
servername sharth.ath.cx
sk545
12-15-2003, 10:54 PM
k, i put in the servername variable in the apache2.conf and removed servername from sites-enabled/default. Now the webserver starts without any error messages. However, when i do 'http://localhost:81' or 'http://IPaddress:81' on a browser, i get a 404 error message:
Not Found
The requested URL / was not found on this server.
The error.log still says, '/htdocs not found'.
I am wondering if the name of both the following variables should be the same or does it matter?:
NameVirtualHost 211.6.185.172:81
<VirtualHost 211.6.184.185:81>
sharth
12-16-2003, 05:24 PM
I'd put namevirtualhost as
namevirtualhost *
sk545
12-17-2003, 12:17 AM
yeah, still get the /htdocs error and the 404. Anyway you could post your apache2.config and /sites-enabled/default files? I think i am going to have to compare them to mine to see what exactly is wrong.
Thanks.