Results 1 to 12 of 12

Thread: non www domain gives "Apache is functioning normally"

  1. #1
    Join Date
    Dec 2018
    Posts
    6

    non www domain gives "Apache is functioning normally"

    Hi all,

    I have a problem on my VPS. All non WWW domains are giving me a "Apache is functioning normally" page. I'v already tried a few thing.
    Like: https://help.directadmin.com/item.php?id=242 after doing whats explained I do not get: Include /usr/local/directadmin/data/users/username/httpd.conf in my directadmin-vhosts.conf file.

    I'm using Apache 2.4.37

    Code:
    <VirtualHost 37.97.144.29:80 >
    	ServerName www.domain.com
    	ServerAlias www.domain.com domain.com 
    	ServerAdmin webmaster@domain.com
    	DocumentRoot /home/domain/domains/domain.com/public_html
    	ScriptAlias /cgi-bin/ /home/domain/domains/domain.com/public_html/cgi-bin/
    	UseCanonicalName OFF
    	<IfModule !mod_ruid2.c>
    		SuexecUserGroup domain domain
    	</IfModule>
    	<IfModule mod_ruid2.c>
    		RMode config
    		RUidGid domain domain
    		#RGroups apache access
    		RGroups @none
    	</IfModule>
    	CustomLog /var/log/httpd/domains/domain.com.bytes bytes
    	CustomLog /var/log/httpd/domains/domain.com.log combined
    	ErrorLog /var/log/httpd/domains/domain.com.error.log
    	<Directory /home/domain/domains/domain.com/public_html>
    		<FilesMatch "\.(inc|php|phtml|phps|php72)$">
    			AddHandler "proxy:unix:/usr/local/php72/sockets/domain.sock|fcgi://localhost" .inc .php .phtml .php72
    		</FilesMatch>
    	</Directory>
    </VirtualHost>
    Can someone help me out please?
    Thanks

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,498
    Hello,

    Do www.domain.com and domain.com resolve to the same IP?

  3. #3
    Join Date
    Dec 2018
    Posts
    6
    Hi,

    I have this:

    lookup…

    www.domain.com -> 37.97.144.29

    lookup...

    domain.com -> 2a01:7c8:aabd:63f:5054:ff:fe49:40e6, 37.97.144.29


    So no IPv6 for www?

  4. #4
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,498
    You tell us I don't know your domain...

    So in this case you have IPv6 2a01:7c8:aabd:63f:5054:ff:fe49:40e6 on your network interface, but it's not in used in VirtualHost. You need to link it in Directadmin to IPv4. Or remove IPv6 from your domains.


    related:
    https://www.directadmin.com/features.php?id=1377

  5. #5
    Join Date
    Dec 2018
    Posts
    6
    Quote Originally Posted by zEitEr View Post
    You tell us I don't know your domain...

    So in this case you have IPv6 2a01:7c8:aabd:63f:5054:ff:fe49:40e6 on your network interface, but it's not in used in VirtualHost. You need to link it in Directadmin to IPv4. Or remove IPv6 from your domains.


    related:
    https://www.directadmin.com/features.php?id=1377
    Yeah I don't know if it is allowed, its for domain www.bi-mannen.com
    And second, Can the IPv6 cause that the site isn't accessible with non www adres?

  6. #6
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,498
    If you connect to internet via IPv6, then IPv6 has a precedence over IPv4 for you. So you will connect to a server via IPv6, and if it's not added into VirtualHost you will see "Apache is functioning normally".

  7. #7
    Join Date
    Dec 2018
    Posts
    6
    and how can I connect it to VirtualHost?

  8. #8
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,498
    I see the both versions have IPv6:


    Code:
    # host www.bi-mannen.com
    www.bi-mannen.com has address 37.97.144.29
    www.bi-mannen.com has IPv6 address 2a01:7c8:aabd:63f:5054:ff:fe49:40e6
    
    # host bi-mannen.com
    bi-mannen.com has address 37.97.144.29
    bi-mannen.com has IPv6 address 2a01:7c8:aabd:63f:5054:ff:fe49:40e6
    bi-mannen.com mail is handled by 10 mail.bi-mannen.com.

    You should add IPv6 as mentioned earlier.

    "Apache is functioning normally" is shown via IPv6.

    Code:
    # curl -6 http://bi-mannen.com/ -s | head
    <html>Apache is functioning normally</html>
    
    # curl -6 http://www.bi-mannen.com/ -s | head
    <html>Apache is functioning normally</html>




    And your site is shown over IPv4.

  9. #9
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,498
    Quote Originally Posted by Boxerke View Post
    and how can I connect it to VirtualHost?

    follow the link for details in my post #4

  10. #10
    Join Date
    Dec 2018
    Posts
    6
    Ow hell, and now the whole site went down

  11. #11
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,498
    it's still up over IPv4.

  12. #12
    Join Date
    Dec 2018
    Posts
    6
    problem is solved, thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •