I desperately try to setup a name based virtual host for use in my local network, for hours.

This is my configuration, the path is correct



    ServerName hausfux.dev

    DocumentRoot "/srv/www/htdocs/hausfux/devLocal"
    ErrorLog /var/log/apache2/hausfux_error.log
    CustomLog /var/log/apache2/hausfux_access.log common


I informed myself here.

Then I added this line to my /etc/hosts file.        hausfux.dev

I also added the same line on my windows clients hosts file.

Then I restarted apache2 with systemctl restart apache2.

If I enter http://hausfux.dev in my windows clients browser, then it automatically changes to https://hausfux.dev and it fails.

If I try to open the project as I used to,with the full absolute link, e.g. then I get Status Error Code 500 (server internal error) now. If I remove my virtual host and restart apache2 then the site works again.

What am I doing wrong?

PS: There are no errors in /var/log/apache2/hausfux_error.log


If I use the following configuration, then it works if I type in the servers IP Adress in the browser at my windows client (

NameVirtualHost *:80

<VirtualHost *:80>

    ServerName hausfux.dev

    DocumentRoot "/srv/www/htdocs/hausfux/devLocal"
    ErrorLog /var/log/apache2/hausfux_error.log
    CustomLog /var/log/apache2/hausfux_access.log common

    <Directory "/srv/www/htdocs/hausfux/devLocal">
        Require all granted


But my goal is, to just enter a name, e.g. http://hausfux.dev instead of the ip address. Is this possible in OpenSUSE or should I use another OS, e.g. Ubuntu?


Response from pinging my DNS-Server:

PING ( 56(84) bytes of data. 64 bytes from icmp_seq=1 ttl=64 time=0.126 ms 64 bytes from icmp_seq=2 ttl=64 time=0.149 ms

  • Clear your browser cache. Oct 18 '18 at 17:25
  • @MichaelHampton, I tried it. I even started the browser in inspector mode. Same problem.
    – Black
    Oct 19 '18 at 7:32
  • try with a command line tool like curl or wget. Additionally if you get redirected to the https part, create either a https part or find the reason why you are redirected, which is not in the config you show. Look in the error/access logs. Oct 19 '18 at 8:05
  • If you ping the DNS name, do you get the desired IP address or something else?
    – Tommiie
    Oct 19 '18 at 9:37
  • @Tom, I added the response to my question
    – Black
    Oct 19 '18 at 9:40

It works after I changed the virtual host name. I think I already used the same VHost name on my windows clients WAMP once and it is still in the config somewhere.

In WAMP you can suppress virtual hosts. Maybe I just supressed it instead of deleting it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.