HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   ISPConfig 3 not following website path (http://www.howtoforge.com/forums/showthread.php?t=55767)

midcarolina 16th January 2012 03:23

ISPConfig 3 not following website path
 
Hello,

I was having this problem a few weeks ago with sites not launching in ISPConfig 3. Apache is not following the filepath to the site. Basically, this is the only error from httpd that I need show as it is redundant:

[client 173.93.151.XXX] File does not exist: /var/www/html/wp-admin

The LAN ip is 192.168.11.7 Here is the output of # ifconfig


eth0 Link encap:Ethernet HWaddr 6C:FD:B9:44:48:60
inet addr:192.168.11.6 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fe80::6efd:b9ff:fe44:4860/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14241 errors:1 dropped:0 overruns:0 frame:0
TX packets:11553 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1738551 (1.6 MiB) TX bytes:7339018 (6.9 MiB)
Interrupt:10 Base address:0x8c00

eth0:1 Link encap:Ethernet HWaddr 6C:FD:B9:44:48:60
inet addr:192.168.11.7 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0x8c00

eth0:2 Link encap:Ethernet HWaddr 6C:FD:B9:44:48:60
inet addr:192.168.11.8 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0x8c00

eth0:3 Link encap:Ethernet HWaddr 6C:FD:B9:44:48:60
inet addr:192.168.11.9 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0x8c00

eth0:4 Link encap:Ethernet HWaddr 6C:FD:B9:44:48:60
inet addr:192.168.11.10 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0x8c00

eth0:5 Link encap:Ethernet HWaddr 6C:FD:B9:44:48:60
inet addr:192.168.11.11 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0x8c00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:15057 errors:0 dropped:0 overruns:0 frame:0
TX packets:15057 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1552877 (1.4 MiB) TX bytes:1552877 (1.4 MiB)

And the output of # ifconfig -a

eth0 Link encap:Ethernet HWaddr 6C:FD:B9:44:48:60
inet addr:192.168.11.6 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fe80::6efd:b9ff:fe44:4860/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14271 errors:1 dropped:0 overruns:0 frame:0
TX packets:11572 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1741363 (1.6 MiB) TX bytes:7343152 (7.0 MiB)
Interrupt:10 Base address:0x8c00

eth0:1 Link encap:Ethernet HWaddr 6C:FD:B9:44:48:60
inet addr:192.168.11.7 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0x8c00

eth0:2 Link encap:Ethernet HWaddr 6C:FD:B9:44:48:60
inet addr:192.168.11.8 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0x8c00

eth0:3 Link encap:Ethernet HWaddr 6C:FD:B9:44:48:60
inet addr:192.168.11.9 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0x8c00

eth0:4 Link encap:Ethernet HWaddr 6C:FD:B9:44:48:60
inet addr:192.168.11.10 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0x8c00

eth0:5 Link encap:Ethernet HWaddr 6C:FD:B9:44:48:60
inet addr:192.168.11.11 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0x8c00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:15108 errors:0 dropped:0 overruns:0 frame:0
TX packets:15108 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1558025 (1.4 MiB) TX bytes:1558025 (1.4 MiB)

These IPs have been added to the server ip list in the ispconfig panel. And restarting apache delivers this (which is a good sign)

]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [Sun Jan 15 21:14:18 2012] [warn] NameVirtualHost 192.168.11.7:443 has no VirtualHosts
[Sun Jan 15 21:14:18 2012] [warn] NameVirtualHost 192.168.11.6:80 has no VirtualHosts
[Sun Jan 15 21:14:18 2012] [warn] NameVirtualHost 192.168.11.6:443 has no VirtualHosts
[Sun Jan 15 21:14:18 2012] [warn] NameVirtualHost 192.168.11.10:80 has no VirtualHosts
[Sun Jan 15 21:14:18 2012] [warn] NameVirtualHost 192.168.11.10:443 has no VirtualHosts
[Sun Jan 15 21:14:18 2012] [warn] NameVirtualHost 192.168.11.9:80 has no VirtualHosts
[Sun Jan 15 21:14:18 2012] [warn] NameVirtualHost 192.168.11.9:443 has no VirtualHosts
[Sun Jan 15 21:14:18 2012] [warn] NameVirtualHost 192.168.11.8:80 has no VirtualHosts
[Sun Jan 15 21:14:18 2012] [warn] NameVirtualHost 192.168.11.8:443 has no VirtualHosts
[Sun Jan 15 21:14:18 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
[ OK ]

And the contents of the site trying to launch in sites-enabled:

<Directory /var/www/domain.com>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

<VirtualHost 192.168.11.7:80>
DocumentRoot /var/www/clients/client1/web1/web

ServerName domain.com
ServerAlias www.domain.com
ServerAdmin webmaster@domain.com

ErrorLog /var/log/ispconfig/httpd/domain.com/error.log


ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 502 /error/502.html
ErrorDocument 503 /error/503.html

<IfModule mod_ssl.c>
</IfModule>
<Directory /var/www/domain.com/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>
<Directory /var/www/clients/client1/web1/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>

<IfModule mod_ruby.c>
<Directory /var/www/domain.com/web>
Options +ExecCGI
</Directory>
RubyRequire apache/ruby-run
#RubySafeLevel 0
<Files *.rb>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
</IfModule>

<IfModule mod_python.c>
<Directory /var/www/domain.com/web>
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
</IfModule>

# cgi enabled
<Directory /var/www/clients/client1/web1/cgi-bin>
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/clients/client1/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
# suexec enabled
SuexecUserGroup web1 client1
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
# suphp enabled
<Directory /var/www/clients/client1/web1/web>
<IfModule mod_suphp.c>
suPHP_Engine on
# suPHP_UserGroup web1 client1
AddHandler x-httpd-suphp .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-suphp
</IfModule>
</Directory>


# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web1 client1
</IfModule>

<IfModule mod_dav_fs.c>
# Do not execute PHP files in webdav directory
<Directory /var/www/clients/client1/web1/webdav>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
</Directory>
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>


</VirtualHost>

The real domain name has been replaced with "domain.com"

Thanks for the help.

rafael-ec 16th January 2012 17:33

what distro are you using?

I had a similar problem and was because I installed ISPconfig in a server that was running a site. I am using Debian and I have to delete dissable the site. If using Debian what do you have in /etc/apache2/sites-enabled?

Regards,

Rafael

midcarolina 16th January 2012 17:42

Hi,

Thanks for the reply. I am not a big fan of Debian or Ubuntu distros. I am using Fedora 14 x86_64 (Falko's Tutorial). I only have one site on the server to test it first, as this is a brand new install. The odd part is that in /sites-enabled/ I have

1. The vhost for ispconfig and
2. The vhost for the website (that was the copy / paste in the original message)

The CPanel for ISPConfig runs fine, which follows a similar Symlink as the site. So, I have:

000-ispconfig.vhost
100-examplesite.com.vhost

Thanks for the help!

till 16th January 2012 20:29

Quote:

I was having this problem a few weeks ago with sites not launching in ISPConfig 3.
The reason for this apache behaviour has been explained to you in several posts already. Apache shows a vhost when the domain and IP match. If IP or domain is wrong, apache routes the request to the default vhost (/var/www).

Check the router configuration, the external IP of domain.com and www.domain.com must be routed to the internal IP 192.168.11.7. If it is routed to any of the other internal IP's on that server, apache can not route the requests to this vhost.

midcarolina 17th January 2012 17:13

Till,

This is also what I have explained to you in several posts. I can do port forwarding, port range forwarding, etc. in my sleep. The WAN IP is port forwarded to this domain only. To make it easier on you, I will be glad to fill up this entire server with files, isp vhost files, screenshots, whatever you need to show you that this domain is specifically forwarded to this LAN IP and this domain only. If ISPConfig is running on the main server IP...example, that being

192.168.1.5 and ISPConfig loads fine, then you create an alias eth0:0 with your Public IP forwarded to 192.168.1.6 (where eth0:0 includes the information for this IP), then you add it in the config panel, then ISPConfig creates a

100-domain.com.vhost file with this IP, then the site should launch. What would you like for me to send you indicating that ALL of this is configured in this way?

till 17th January 2012 18:50

1) Please post the output of:

grep Include /etc/httpd/httpd.conf

adjust the path to httpd.conf if it does not match the path on your server.

2) Login to ispconfig and change the IP address in the settings of all sites to * , then wait a few minutes and try to access the sites again.

midcarolina 17th January 2012 20:45

Hi Till,

Ok, you accidentally left out the /conf/ folder in the grep command, so here is the output of grep Include /etc/httpd/conf/httpd.conf


[root@solution ~]# grep Include /etc/httpd/conf/httpd.conf
Include conf.d/*.conf
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# (You will also need to add "Includes" to the "Options" directive.)
Options IncludesNoExec
AddOutputFilter Includes html
Include /etc/httpd/conf/sites-enabled/

Will let you know about the wildcard *80 results soon. Would like to know your thoughts in the meantime on the grep output above.

Thank you.

till 17th January 2012 21:17

The grep output is ok.


All times are GMT +2. The time now is 22:48.

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