#1  
Old 20th February 2007, 16:03
laser144 laser144 is offline
Member
 
Join Date: Apr 2006
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Default apache2 problem

Hi,

Having switched ISP, I am having problems with my webserver (LAMP -
Debian Sarge, Apache2). It used to work like a charm with my old ISP and all I changed is the first ServerName entry (which I copied from my IPCops main page).

For some reason I cannot access the DocumentRoot (/var/www/
sailmaster.nl/) folder for the sailmaster website (www.sailmaster.nl).
I can access www.sailmaster.nl/administrator and phpMyAdmin, which is
a symlink in the /var/www/sailmaster.nl/ directory. There are no
problems connecting to www.gijpstuiver.nl

Setting up the server while connected via my previous ISP, I found out
that with virtual hosting you always have to have the hostname for the
IP-address of the server first in the file which sets the virtual
hosts. My modem is in bridged mode, so the IP-address and the hostname
is passed on to the 'red' Ethernet card on my IPCop firewall, which is
set to DHCP. The IP-address is 84.245.34.233, the hostname is
84-245-34-233.dsl.cambrium.nl

I can ping all hostnames and IP-addresses (the internal IP-address of
my server as well). I think it must be some DNS-related problem, but I
haven't got a clue how to solve it.

Any help or advice is greatly appreciated!

Underneath is a copy of my /etc/apache2/sites-available/default

Regards,

Andy

NameVirtualHost *:80

<VirtualHost *:80>
ServerName 84-245-34-233.dsl.cambrium.nl
ServerAdmin webmaster@sailmaster.nl
DocumentRoot /var/www/

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
RedirectMatch ^/$ /apache2-default/
</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 /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

<VirtualHost *:80>
ServerName www.sailmaster.nl
ServerAlias sailmaster.nl *.sailmaster.nl
ServerAdmin webmaster@sailmaster.nl
DocumentRoot /var/www/sailmaster.nl/
</VirtualHost>

<VirtualHost *:80>
ServerName www.gijpstuiver.nl
ServerAlias gijpstuiver.nl *.gijpstuiver.nl
ServerAdmin webmaster@sailmaster.nl
DocumentRoot /var/www/gijpstuiver.nl/gallery2/
</VirtualHost>
Reply With Quote
Sponsored Links
  #2  
Old 21st February 2007, 23:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

What's the output of
Code:
ls -la /var/www/sailmaster.nl/
? Any errors in Apache's error log?
__________________
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 6th March 2007, 09:28
laser144 laser144 is offline
Member
 
Join Date: Apr 2006
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Falko,

The output of ls -la /var/www/sailmaster.nl/:


drwxrwxrwx 16 root root 4096 2007-02-20 10:23 .
drwxr-xr-x 5 root root 4096 2006-12-19 14:21 ..
drwxr-xr-x 9 root root 4096 2006-05-19 21:36 administrator
drwxrwxrwx 2 root root 4096 2006-08-28 21:20 cache
-rwxr-xr-x 1 root root 99938 2006-12-24 21:22 CHANGELOG.php
drwxr-xr-x 24 root root 4096 2006-05-19 21:36 components
-rw-r--r-- 1 www-data www-data 2743 2007-01-16 11:08 configuration.php
-rwxrwxrwx 1 root root 4251 2006-08-28 21:20 configuration.php-dist
-rwxrwxrwx 1 root root 3429 2006-08-28 21:20 COPYRIGHT.php
drwxrwxrwx 2 root root 4096 2006-08-28 21:20 editor
drwxr-xr-x 2 root root 4096 2006-12-21 13:25 files
drwxr-xr-x 8 root root 4096 2006-12-20 08:51 gallery2
-rwxrwxrwx 1 root root 3535 2007-01-22 10:47 globals.php
drwxrwxrwx 3 root root 8192 2007-01-09 09:54 help
-rwxr-xr-x 1 root root 4829 2007-02-20 10:23 .htaccess
-rwxr-xr-x 1 root root 4829 2006-12-24 21:22 htaccess.txt
drwxrwxrwx 8 root root 4096 2007-01-08 10:02 images
drwxrwxrwx 10 root root 4096 2007-01-09 09:54 includes
-rwxr-xr-x 1 root root 5223 2006-12-24 21:22 index2.php
-rwxr-xr-x 1 root root 8491 2006-12-24 21:22 index.php
-rwxr-xr-x 1 root root 4376 2006-12-24 21:22 INSTALL.php
drwxrwxrwx 2 root root 4096 2007-01-09 09:54 language
-rwxrwxrwx 1 root root 17977 2006-08-28 21:20 LICENSE.php
-rwxrwxrwx 1 root root 710 2006-08-28 21:20 mainbody.php
drwxrwxrwx 7 root root 4096 2006-08-28 21:20 mambots
drwxrwxrwx 5 root root 4096 2007-01-21 14:59 media
drwxrwxrwx 6 root root 4096 2007-01-21 14:59 modules
-rwxrwxrwx 1 root root 2474 2006-08-28 21:20 offlinebar.php
-rwxr-xr-x 1 root root 4929 2006-12-24 21:22 offline.php
-rwxrwxrwx 1 root root 709 2006-08-28 21:20 pathway.php
lrwxrwxrwx 1 root root 21 2006-12-19 19:28 phpmyadmin -> /usr/share/phpmyadmin
-rwxrwxrwx 1 root root 286 2006-08-28 21:20 robots.txt
drwxrwxrwx 6 root root 4096 2006-12-19 21:00 templates

From Apache's log:

...snip...

192.168.0.99 - - [05/Mar/2007:16:26:52 +0100] "GET /phpmyadmin/themes/original/img/logo_right.png HTTP/1.1" 304 - "http://192.168.1.2/phpmyadmin/" "Mozilla/5
.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/20070216 Firefox/1.5.0.10"
192.168.0.99 - - [05/Mar/2007:16:33:54 +0100] "GET /administrator/ HTTP/1.1" 200 2116 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/20
070216 Firefox/1.5.0.10"
192.168.0.99 - - [05/Mar/2007:16:34:01 +0100] "GET / HTTP/1.1" 302 380 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/20070216 Firefox/
1.5.0.10"
192.168.0.99 - - [05/Mar/2007:16:34:01 +0100] "GET /apache2-default/ HTTP/1.1" 404 1173 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/
20070216 Firefox/1.5.0.10"
192.168.0.99 - - [05/Mar/2007:17:06:59 +0100] "GET /administrator/ HTTP/1.1" 200 2116 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/20
070216 Firefox/1.5.0.10"
192.168.0.99 - - [05/Mar/2007:17:07:02 +0100] "GET / HTTP/1.1" 302 380 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/20070216 Firefox/
1.5.0.10"
192.168.0.99 - - [05/Mar/2007:17:07:02 +0100] "GET /apache2-default/ HTTP/1.1" 404 1173 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/
20070216 Firefox/1.5.0.10"
192.168.0.99 - - [05/Mar/2007:17:07:04 +0100] "GET /phpmyadmin/ HTTP/1.1" 200 12074 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/2007
0216 Firefox/1.5.0.10"
192.168.0.99 - - [05/Mar/2007:17:07:04 +0100] "GET /phpmyadmin/css/phpmyadmin.css.php?lang=nl&js_frame=right&js_isDOM =1 HTTP/1.1" 200 12240 "http://192.168.1
.2/phpmyadmin/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/20070216 Firefox/1.5.0.10"
192.168.0.1 - - [05/Mar/2007:18:41:19 +0100] "GET / HTTP/1.1" 302 384 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/20070216 Firefox/1
.5.0.10"
192.168.0.1 - - [05/Mar/2007:18:41:19 +0100] "GET /apache2-default/ HTTP/1.1" 404 1175 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/2
0070216 Firefox/1.5.0.10"
192.168.0.1 - - [05/Mar/2007:18:41:19 +0100] "GET /favicon.ico HTTP/1.1" 404 1175 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/200702
16 Firefox/1.5.0.10"
84.16.231.53 - - [05/Mar/2007:22:34:40 +0100] "" 414 429 "-" "-"
84.16.231.53 - - [06/Mar/2007:04:49:17 +0100] "" 414 429 "-" "-"
192.168.0.99 - - [06/Mar/2007:09:23:36 +0100] "GET /administrator/ HTTP/1.1" 200 2116 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/20
070216 Firefox/1.5.0.10"
192.168.0.99 - - [06/Mar/2007:09:23:37 +0100] "GET / HTTP/1.1" 302 380 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/20070216 Firefox/
1.5.0.10"
192.168.0.99 - - [06/Mar/2007:09:23:37 +0100] "GET /apache2-default/ HTTP/1.1" 404 1173 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/
20070216 Firefox/1.5.0.10"
192.168.0.99 - - [06/Mar/2007:09:42:37 +0100] "GET /administrator/ HTTP/1.1" 200 2116 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/20
070216 Firefox/1.5.0.10"
192.168.0.99 - - [06/Mar/2007:09:42:39 +0100] "GET / HTTP/1.1" 302 380 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/20070216 Firefox/
1.5.0.10"
192.168.0.99 - - [06/Mar/2007:09:42:39 +0100] "GET /apache2-default/ HTTP/1.1" 404 1173 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.10) Gecko/
20070216 Firefox/1.5.0.10"

/...snip...

BTW: I just got this back from http://www.dnsreport.com/tools/dnsre...=sailmaster.nl

...snip...
WARN TCP Allowed WARNING: One or more of your DNS servers does not
accept TCP connections. Although rarely used, TCP connections are
occasionally used instead of UDP connections. When firewalls block the
TCP DNS connections, it can cause hard-to-diagnose problems. The problem
servers are:

212.79.232.3: Timeout. 195.245.199.130: Timeout. 212.79.243.3: Timeout.
WARN Single Point of Failure WARNING: Although you have at least 2 NS
records, there is a chance that they may both point to the same server
(one of our two tests shows them being different, the other is unsure;
it appears that there are one or more firewall(s) that intercept and
alter DNS packets (some versions of Linux reportedly have a built-in
firewall that does this, too)), which would result in a single point of
failure. You are required to have at least 2 nameservers per RFC 1035
section 2.2.
/...snip...

Could that be part of the problem?

Regards,

Andy

Last edited by laser144; 6th March 2007 at 12:23.
Reply With Quote
  #4  
Old 7th March 2007, 18:19
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

You posted Apache's access log, not the error log.

What's in /var/www/sailmaster.nl/.htaccess?

The DNS serveri s responding fine, so I don't think that's the problem.
__________________
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
  #5  
Old 8th March 2007, 12:28
laser144 laser144 is offline
Member
 
Join Date: Apr 2006
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Ooops...

Error log:

[Tue Mar 06 12:27:41 2007] [error] [client 213.126.142.46] File does not exist: /var/www/sailmaster.nl/favicon.ico
[client 74.6.75.47] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[Tue Mar 06 14:30:57 2007] [error] [client 84.16.231.53] request failed: URI too long (longer than 8190)
[Tue Mar 06 14:43:58 2007] [error] [client 66.249.72.50] File does not exist: /var/www/gijpstuiver.nl/gallery2/robots.txt
[Tue Mar 06 14:43:58 2007] [error] [client 66.249.72.50] File does not exist: /var/www/gijpstuiver.nl/gallery2/gallery2
[client 74.6.72.72] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[client 72.30.177.160] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[client 74.6.70.90] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[Tue Mar 06 19:54:56 2007] [error] [client 83.71.188.242] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DF
ind
[Tue Mar 06 20:36:38 2007] [error] [client 84.16.231.53] request failed: URI too long (longer than 8190)
[Tue Mar 06 21:53:12 2007] [error] [client 74.6.75.31] File does not exist: /var/www/gijpstuiver.nl/gallery2/robots.txt
[client 74.6.71.88] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[client 74.6.69.205] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[Wed Mar 07 04:05:09 2007] [error] [client 84.16.231.53] request failed: URI too long (longer than 8190)
[client 74.6.72.73] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[client 74.6.67.101] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[client 65.54.188.60] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[client 65.54.188.60] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[Wed Mar 07 08:17:14 2007] [error] [client 213.254.226.49] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.D
Find
[Wed Mar 07 13:39:25 2007] [error] [client 84.16.231.53] request failed: URI too long (longer than 8190)
[Wed Mar 07 15:35:47 2007] [error] [client 74.6.75.31] File does not exist: /var/www/gijpstuiver.nl/gallery2/robots.txt
[Wed Mar 07 19:53:30 2007] [error] [client 84.16.231.53] request failed: URI too long (longer than 8190)
[Wed Mar 07 22:58:23 2007] [error] [client 84.16.230.45] request failed: URI too long (longer than 8190)
[client 74.6.74.169] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[Thu Mar 08 02:44:42 2007] [error] [client 66.249.72.10] File does not exist: /var/www/gijpstuiver.nl/gallery2/robots.txt
[Thu Mar 08 03:37:59 2007] [error] [client 84.16.231.53] request failed: URI too long (longer than 8190)
[client 74.6.68.166] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[client 65.54.188.59] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[client 74.6.71.52] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[Thu Mar 08 08:55:29 2007] [error] [client 62.75.204.167] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DF
ind
[Thu Mar 08 08:59:00 2007] [error] [client 84.16.231.53] request failed: URI too long (longer than 8190)
[client 74.6.74.177] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
[client 74.6.73.85] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat


.htaccess:



Options +FollowSymLinks

#
# mod_rewrite in use

RewriteEngine On


# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla!/MamboDirectory (just / for root)

# RewriteBase /


########## Begin - Joomla! core SEF Section
############# Use this section if using ONLY Joomla! core SEF
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteRule ^(content/|component/) index.php
#
########## End - Joomla! core SEF Section



########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section



########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits
Reply With Quote
  #6  
Old 8th March 2007, 12:57
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

You're missing files:
Quote:
Tue Mar 06 14:43:58 2007] [error] [client 66.249.72.50] File does not exist: /var/www/gijpstuiver.nl/gallery2/gallery2
[client 74.6.72.72] script '/var/www/sailmaster.nl/modules.php' not found or unable to stat
and you have errors in your rewrite statements. You apparently have a broken Gallery2 installation, also because I don't see the default Gallery2 rewrite rules.
Quote:
[Tue Mar 06 20:36:38 2007] [error] [client 84.16.231.53] request failed: URI too long (longer than 8190)
indicates rewrite errors. I suggest to fix the Gallery2 install 1st (or remove the left overs if you de-installed) and then add rewritelog directive to the apache config and start debugging.
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
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 12:20
Problem with upload.php (Apache2 ubuntu6.10) ambiz_x Server Operation 7 15th February 2007 19:51
Problem with Tomcat5 and Apache2 with Virtual Hosts using mod_jk llokas HOWTO-Related Questions 1 17th January 2007 18:32
Access Problem with Apache2 Alias Heinz Installation/Configuration 3 18th November 2006 15:19
Big problem with apache2 on Ubuntu piratta Installation/Configuration 2 18th January 2006 17:29


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


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