All, Have a small problem. Have setup a server using the guide on howtoforge. Server name is server/mutoh-seikatsu/com. Then under ISPconfig I have set up the server as being reachable at rijken/homelinux/net. Have added a client site under the admin page and it set up the virtual host correctly, but whenever I access www/mutoh-seikatsu/com from the internet I get the standard fedora test page in /var/www/html, which is set as document root. When people access www/mutoh-seikatsu/com though they should be redirected to /var/www/web3/web Here is the setup from webmin: Default Server Defines the default settings for all other virtual servers, and processes any unhandled requests. Address Any Port Any Server Name Automatic Document Root /var/www/html Virtual Server Handles the name-based server localhost on address 122/249/2/10. Address 122/249/2/210 Port 80 Server Name localhost Document Root /var/www/sharedip Virtual Server Handles the name-based server www/mutoh-seikatsu/com:80 on address 122/249/2/210. Address 122,249,2,210 Port 80 Server Name www/mutoh-seikatsu/com:80 Document Root /var/www/web3/web Virtual Server Handles the name-based server www/famrijkennet:80 on address 122/249/2/210. Address 122/249/2/210 Port 80 Server Name www/famrijken/net:80 Document Root /var/www/web2/web When I access www/mutoh-seikatsu/com I get redirected to the default server. Access log: w21/jp-k/ne/jp - - [22/Sep/2009:10:24:02 +0900] "GET / HTTP/1.1" 403 3918 "-" "SoftBank/1.0/930CA/CAJ001/SN356757020724089 Browser/NetFront/3.4 Profile/MIDP-2.0 Configuration/CLDC-1.1" w22/jp-k/ne/jp - - [22/Sep/2009:10:24:04 +0900] "GET /icons/apache_pb2.gif HTTP/1.1" 200 1797 "http://www,mutoh-seikatsu,com/" "SoftBank/1.0/930CA/CAJ001/SN356757020724089 Browser/NetFront/3.4 Profile/MIDP-2.0 Configuration/CLDC-1.1" w22/jp-k/ne/jp - - [22/Sep/2009:10:24:04 +0900] "GET /icons/poweredby.png HTTP/1.1" 200 3034 "http://www,mutoh-seikatsu,com/" "SoftBank/1.0/930CA/CAJ001/SN356757020724089 Browser/NetFront/3.4 Profile/MIDP-2.0 Configuration/CLDC-1.1" In Webmin I have set the following as well: Networking and Addresses for www,mutoh-seikatsu,com:80:80 Lookup hostnames: Yes Do RFC1413 user lookups: Default Server admin email address: **@mutoh-seikatsu,com Alternate virtual server names: mutoh-seikatsu,com server,mutoh-seikatsu.com Server hostname: www,mutoh-seikatsu,com Use hostname supplied by browser: Yes Anybody got any idea what has been set up wrong?
Using webmin and ISPConfig on the same server will cause the server to not work properly when you edit anything from the webserver settings in webmin. It is highly recommended to not install webmin on a ispconfig server or at least do not use webmin to configure anything related to apache, postfix and bind.
Thanks for the answer... Installed webmin as I couldn't get ISPconfig to direct to the correct directories as stated in Vhosts_ispconfig.conf (find below): ################################### # # ISPConfig vHost Configuration File # Version 1.0 # ################################### # NameVirtualHost 122.249.2.210:80 <VirtualHost 122.249.2.210:80> ServerName localhost ServerAdmin root@localhost DocumentRoot /var/www/sharedip <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] </IfModule> </VirtualHost> # # ###################################### # Vhost: www.mutoh-seikatsu.com:80 ###################################### # # <VirtualHost 122.249.2.210:80> ServerName www.mutoh-seikatsu.com:80 ServerAdmin [email protected] DocumentRoot /var/www/web3/web ServerAlias mutoh-seikatsu.com server.mutoh-seikatsu.com DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm Alias /cgi-bin/ /var/www/web3/cgi-bin/ AddHandler cgi-script .cgi AddHandler cgi-script .pl ErrorLog /var/www/web3/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 php_admin_flag safe_mode Off <IfModule mod_ruby.c> <Directory /var/www/web3/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/web3/web> #Options +Indexes +FollowSymLinks +MultiViews #AllowOverride Indexes AuthConfig Limit FileInfo #Order allow,deny #allow from all AddHandler mod_python .py PythonHandler mod_python.publisher PythonDebug On </Directory> </IfModule> AddType text/html .shtml AddOutputFilter INCLUDES .shtml AddType application/vnd.wap.wmlscriptc .wmlsc .wsc AddType text/vnd.wap.wml .wml AddType text/vnd.wap.wmlscript .ws .wmlscript AddType image/vnd.wap.wbmp .wbmp Alias /stats "/var/www/web3/web/webalizer" Alias /error/ "/var/www/web3/web/error/" ErrorDocument 400 /error/invalidSyntax.html ErrorDocument 401 /error/authorizationRequired.html ErrorDocument 403 /error/forbidden.html ErrorDocument 404 /error/fileNotFound.html ErrorDocument 405 /error/methodNotAllowed.html ErrorDocument 500 /error/internalServerError.html ErrorDocument 503 /error/overloaded.html AliasMatch ^/~([^/]+)(/(.*))? /var/www/web3/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web3/user/$1/web/$3 <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] </IfModule> <IfModule mod_dav.c> Alias /webdav /var/www/web3/web <Location /webdav> DAV On AuthType Basic AuthName "webdav" AuthUserFile /var/www/web3/passwd.dav Require valid-user </Location> </IfModule> </VirtualHost> the sharedip one does not work either. Everything gets picked up by the default server. Find below the part concerning virtual hosts from httpd.conf: ### Section 3: Virtual Hosts # # VirtualHost: If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # <URL:http://httpd.apache.org/docs/2.2/vhosts/> # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # Use name-based virtual hosting. # #NameVirtualHost *:80 # # NOTE: NameVirtualHost cannot be used without a port specifier # (e.g. :80) if mod_ssl is being used, due to the nature of the # SSL protocol. # # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # #<VirtualHost *:80> # ServerAdmin [email protected] # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common #</VirtualHost> <Directory /var/www/sharedip> Options +Includes -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory> ###############ispconfig_log############### LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d" combined_ispconfig <Directory /var/www/*/web> Options +Includes -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory> <Directory /var/www/*/user/*/web> Options +Includes -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory> <Directory /var/www/*/cgi-bin> Options ExecCGI -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory> Include /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf ### AWStats Section ### Alias /icon "/home/admispconfig/ispconfig/tools/awstats/wwwroot/icon/" NameVirtualHost 122.249.2.210 ### End of AWStats Section ### Any help appreciated
thanks for your reply. Only installed webmin as I couldn't get it to work before (everything was handled by the default instead of the virtual server). Find below the Vhosts_ispconfig.conf file: ################################### # # ISPConfig vHost Configuration File # Version 1.0 # ################################### # NameVirtualHost 122.249.2.210:80 <VirtualHost 122.249.2.210:80> ServerName localhost ServerAdmin root@localhost DocumentRoot /var/www/sharedip <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] </IfModule> </VirtualHost> # # ###################################### # Vhost: www.mutoh-seikatsu.com:80 ###################################### # # <VirtualHost 122.249.2.210:80> ServerName www.mutoh-seikatsu.com:80 ServerAdmin [email protected] DocumentRoot /var/www/web3/web ServerAlias mutoh-seikatsu.com server.mutoh-seikatsu.com DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm Alias /cgi-bin/ /var/www/web3/cgi-bin/ AddHandler cgi-script .cgi AddHandler cgi-script .pl ErrorLog /var/www/web3/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 php_admin_flag safe_mode Off <IfModule mod_ruby.c> <Directory /var/www/web3/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/web3/web> #Options +Indexes +FollowSymLinks +MultiViews #AllowOverride Indexes AuthConfig Limit FileInfo #Order allow,deny #allow from all AddHandler mod_python .py PythonHandler mod_python.publisher PythonDebug On </Directory> </IfModule> AddType text/html .shtml AddOutputFilter INCLUDES .shtml AddType application/vnd.wap.wmlscriptc .wmlsc .wsc AddType text/vnd.wap.wml .wml AddType text/vnd.wap.wmlscript .ws .wmlscript AddType image/vnd.wap.wbmp .wbmp Alias /stats "/var/www/web3/web/webalizer" Alias /error/ "/var/www/web3/web/error/" ErrorDocument 400 /error/invalidSyntax.html ErrorDocument 401 /error/authorizationRequired.html ErrorDocument 403 /error/forbidden.html ErrorDocument 404 /error/fileNotFound.html ErrorDocument 405 /error/methodNotAllowed.html ErrorDocument 500 /error/internalServerError.html ErrorDocument 503 /error/overloaded.html AliasMatch ^/~([^/]+)(/(.*))? /var/www/web3/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web3/user/$1/web/$3 <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] </IfModule> <IfModule mod_dav.c> Alias /webdav /var/www/web3/web <Location /webdav> DAV On AuthType Basic AuthName "webdav" AuthUserFile /var/www/web3/passwd.dav Require valid-user </Location> </IfModule> </VirtualHost> find below httpd.conf where virtual servers are concerned. ### Section 3: Virtual Hosts # # VirtualHost: If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # <URL:http://httpd.apache.org/docs/2.2/vhosts/> # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # Use name-based virtual hosting. # #NameVirtualHost *:80 # # NOTE: NameVirtualHost cannot be used without a port specifier # (e.g. :80) if mod_ssl is being used, due to the nature of the # SSL protocol. # # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # #<VirtualHost *:80> # ServerAdmin [email protected] # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common #</VirtualHost> <Directory /var/www/sharedip> Options +Includes -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory> ###############ispconfig_log############### LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d" combined_ispconfig <Directory /var/www/*/web> Options +Includes -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory> <Directory /var/www/*/user/*/web> Options +Includes -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory> <Directory /var/www/*/cgi-bin> Options ExecCGI -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory> Include /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf ### AWStats Section ### Alias /icon "/home/admispconfig/ispconfig/tools/awstats/wwwroot/icon/" NameVirtualHost 122.249.2.210 ### End of AWStats Section ### Help appreciated
As a test I've added another website. DNS was set automatically so also changed DNS at my registrar to point at my IP. Again it gets handled as the default server and get redirected to /var/www/html instead of /var/www/web9/web Here's the ISP config file (part that was added): ###################################### # Vhost: www.famrijken.net:80 ###################################### # # <VirtualHost 122.249.2.210:80> ServerName www.famrijken.net:80 ServerAdmin [email protected] DocumentRoot /var/www/web9/web ServerAlias famrijken.net DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm Alias /cgi-bin/ /var/www/web9/cgi-bin/ AddHandler cgi-script .cgi AddHandler cgi-script .pl ErrorLog /var/www/web9/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 php_admin_flag safe_mode On php_admin_value open_basedir /var/www/web9/ php_admin_value file_uploads 1 php_admin_value upload_tmp_dir /var/www/web9/phptmp/ php_admin_value session.save_path /var/www/web9/phptmp/ <IfModule mod_ruby.c> <Directory /var/www/web9/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/web9/web> #Options +Indexes +FollowSymLinks +MultiViews #AllowOverride Indexes AuthConfig Limit FileInfo #Order allow,deny #allow from all AddHandler mod_python .py PythonHandler mod_python.publisher PythonDebug On </Directory> </IfModule> AddType text/html .shtml AddOutputFilter INCLUDES .shtml AddType application/vnd.wap.wmlscriptc .wmlsc .wsc AddType text/vnd.wap.wml .wml AddType text/vnd.wap.wmlscript .ws .wmlscript AddType image/vnd.wap.wbmp .wbmp Alias /stats "/var/www/web9/web/webalizer" Alias /error/ "/var/www/web9/web/error/" ErrorDocument 400 /error/invalidSyntax.html ErrorDocument 401 /error/authorizationRequired.html ErrorDocument 403 /error/forbidden.html ErrorDocument 404 /error/fileNotFound.html ErrorDocument 405 /error/methodNotAllowed.html ErrorDocument 500 /error/internalServerError.html ErrorDocument 503 /error/overloaded.html AliasMatch ^/~([^/]+)(/(.*))? /var/www/web9/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web9/user/$1/web/$3 <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] </IfModule> <IfModule mod_dav.c> Alias /webdav /var/www/web9/web <Location /webdav> DAV On AuthType Basic AuthName "webdav" AuthUserFile /var/www/web9/passwd.dav Require valid-user </Location> </IfModule> </VirtualHost> and the logs of the time I tried to access www.famrijken.net from my phone, first /etc/httpd/logs/access_log: pw126251063144.11.tss.panda-world.ne.jp - - [23/Sep/2009:23:38:38 +0900] "GET / HTTP/1.1" 403 3918 "-" "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; ja-jp) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16" pw126251063144.11.tss.panda-world.ne.jp - - [23/Sep/2009:23:38:39 +0900] "GET /icons/apache_pb2.gif HTTP/1.1" 200 1797 "http://www.famrijken.net/" "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; ja-jp) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16" pw126251063144.11.tss.panda-world.ne.jp - - [23/Sep/2009:23:38:39 +0900] "GET /icons/poweredby.png HTTP/1.1" 200 3034 "http://www.famrijken.net/" "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; ja-jp) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16" and second from the ispconfig httpd logs: server.mutoh-seikatsu.com||||3918||||pw126251063144.11.tss.panda-world.ne.jp - - [23/Sep/2009:23:38:38 +0900] "GET / HTTP/1.1" 403 3918 "-" "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; ja-jp) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16" server.mutoh-seikatsu.com||||1797||||pw126251063144.11.tss.panda-world.ne.jp - - [23/Sep/2009:23:38:39 +0900] "GET /icons/apache_pb2.gif HTTP/1.1" 200 1797 "http://www.famrijken.net/" "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; ja-jp) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16" server.mutoh-seikatsu.com||||3034||||pw126251063144.11.tss.panda-world.ne.jp - - [23/Sep/2009:23:38:39 +0900] "GET /icons/poweredby.png HTTP/1.1" 200 3034 "http://www.famrijken.net/" "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; ja-jp) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16" Help is again appreciated!
Thanks for your answer... Yes it's behind a router that comes with the fiber optic line. Can set anything on it though... Possible? Not possible? Help greatly appreciated!
If your server is behind a router (in a NAT enviroment), you have to select the internal server IP for the website and not the external IP.
Thanks again! You mean at the server settings? Also the DNS settings? Have set the server now to 192.168.24.20 and the websites changed automatically as well. DNS didn't change automatically though. Change this as well? Thanks, looking forward to getting this work!
Yes. No, only at the server settings. In the DNS settings you have to use the external IP while in the website settings, the internal IP has to be used.