HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Problems when going to www.yourname.com but not yourname.com (http://www.howtoforge.com/forums/showthread.php?t=36165)

reason8 9th June 2009 14:22

Problems when going to www.yourname.com but not yourname.com
 
Hello and good morning.

I am having a problem when users goto www.yourname.com
The site that is appearing is one of the first sites that I setup but when users goto yourname.com, everything works and resolves correctly.

What could the problem be?

Thank you!

Falrish 9th June 2009 16:01

there are a few places you need to check...

First look in the bind named.conf file for how your ISPConfig is storing the Bind data. Here will will find something like this. (mine is located at /var/named/chroot/var/named/)
Code:

$TTL        86400
@      IN      SOA    ns1.yourdomain.com. admin.yourdomain.com. (
                        2009010101      ; serial, todays date + todays serial #
                        28800              ; refresh, seconds
                        7200              ; retry, seconds
                        604800              ; expire, seconds
                        86400 )            ; minimum, seconds
;
          NS      ns1.yourdomain.com.              ; Inet Address of name server 1
          NS      ns2.yourdomain.com.              ; Inet Address of name server 2
;
  MX      10 s1.yourdomain.com.
erikwestlake.com.      A        127.0.0.1
www      A      127.0.0.1
yourdomain.com.      TXT  "v=spf1 a mx ptr ~all"
;;;; MAKE MANUAL ENTRIES BELOW THIS LINE! ;;;;

ensure you have the www A record (or you could make it a CNAME if you like)

Next check the Apache configuration files. (mine is /etc/apache/vhosts/)
Code:

######################################
# Vhost: www.yourdomain.com:80
######################################
#
#
<VirtualHost 127.0.0.1:80>
SuexecUserGroup nobody web1
ServerName www.yourdomain.com:80
ServerAdmin webmaster@yourdomain.com
DocumentRoot /var/www/web1/web
ServerAlias yourdomain.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/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web1/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_flag safe_mode Off
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 /error/ "/var/www/web1/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/web1/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  RewriteRule .* - [F]
</IfModule>
</VirtualHost>

If you have all this up as it is, reload apache and named and you should be good. Let me know if this helps.

reason8 9th June 2009 16:22

Quote:

Originally Posted by Falrish (Post 193017)
there are a few places you need to check...

First look in the bind named.conf file for how your ISPConfig is storing the Bind data. Here will will find something like this. (mine is located at /var/named/chroot/var/named/)
Code:

$TTL        86400
@      IN      SOA    ns1.yourdomain.com. admin.yourdomain.com. (
                        2009010101      ; serial, todays date + todays serial #
                        28800              ; refresh, seconds
                        7200              ; retry, seconds
                        604800              ; expire, seconds
                        86400 )            ; minimum, seconds
;
          NS      ns1.yourdomain.com.              ; Inet Address of name server 1
          NS      ns2.yourdomain.com.              ; Inet Address of name server 2
;
  MX      10 s1.yourdomain.com.
erikwestlake.com.      A        127.0.0.1
www      A      127.0.0.1
yourdomain.com.      TXT  "v=spf1 a mx ptr ~all"
;;;; MAKE MANUAL ENTRIES BELOW THIS LINE! ;;;;

ensure you have the www A record (or you could make it a CNAME if you like)

Next check the Apache configuration files. (mine is /etc/apache/vhosts/)
Code:

######################################
# Vhost: www.yourdomain.com:80
######################################
#
#
<VirtualHost 127.0.0.1:80>
SuexecUserGroup nobody web1
ServerName www.yourdomain.com:80
ServerAdmin webmaster@yourdomain.com
DocumentRoot /var/www/web1/web
ServerAlias yourdomain.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/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web1/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_flag safe_mode Off
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 /error/ "/var/www/web1/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/web1/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  RewriteRule .* - [F]
</IfModule>
</VirtualHost>

If you have all this up as it is, reload apache and named and you should be good. Let me know if this helps.

I'll check into this. I might add that I am using dynamic dns. This might be pertinent information.

Also, I dont have a named.conf or vhosts file in opensuse 11.1 (I cant locate it). What else might it be?

The A record is created with my dynamic dns provider so I do not have one (nor have I created it) on the ISPC3 server. Should I?

I believe everything was working weeks ago. I updated to the newest ISP3 3.0.1.3 and this is when I noticed the problem. Not that the update caused the problem but everything was working awhile back. I dont know what could have changed.

Falrish 9th June 2009 17:21

Are you running BIND9 or any other DNS system? If not then there is your problem :)

Dynamic DNS running of a company like DynDNS I would not recommend but I am not ISPConfig expert. The problem with Dynamic DNS is it makes it too difficult to keep track of the IP addresses and where they map within programs like this one.

reason8 10th June 2009 02:28

Quote:

Originally Posted by Falrish (Post 193049)
Are you running BIND9 or any other DNS system? If not then there is your problem :)

Dynamic DNS running of a company like DynDNS I would not recommend but I am not ISPConfig expert. The problem with Dynamic DNS is it makes it too difficult to keep track of the IP addresses and where they map within programs like this one.

I am running myDNS. I installed ISPC3 with not problems using the "How-To's" and resolution worked perfectly. Something has happened in the last few weeks or so and I believe it had something to do with the update because I have not checked the websites since updating.

If my ddns service provide creates mx, cname and A records, do I need to create any others in ISPC3?

Falrish 10th June 2009 02:41

if your DNS is being handled by a third party I do not think you would need to put them into myDNS...However, I am no expert in that. I will leave this to the experts ;)

reason8 10th June 2009 02:42

Quote:

Originally Posted by Falrish (Post 193105)
if your DNS is being handled by a third party I do not think you would need to put them into myDNS...However, I am no expert in that. I will leave this to the experts ;)

But myDNS would still need to be used and loaded as a service, right?

till 10th June 2009 08:38

No, you can stop mydns.

reason8 10th June 2009 10:15

Quote:

Originally Posted by till (Post 193143)
No, you can stop mydns.

This did not solve my problem. Any other ideas or suggestions?

reason8 10th June 2009 13:09

I figured it out. You now have to set auto subdomain to "www" whereas before, you could leave it as default. I am assuming this was part of the 3.0.1.3 update.

Can anyone confirm this?


All times are GMT +2. The time now is 05:25.

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