Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two domains that are redirected to my server IP. I removed (I think) all entires from /etc/apache/sites-available/* that was responsible for resolving those host names.

Now when I'm trying to use this domains, they still redirects to this IP (and it's OK since domains are still assigned to it) but to certain folder I don't know and it results with 403.

What I expect:

When I type the domain name in browser it should end with no server found.

Are there any other places that I must search to eventually delete something?

share|improve this question
2  
If you want to have a "no server found" error you should remove the site entry from DNS. –  Mircea Vutcovici Sep 21 '11 at 13:51

3 Answers 3

up vote 2 down vote accepted

Apache will use the default configuration if there are no virtual hosts that match (or if virtual hosting is not enabled). You can find the directory with grep -ri DocumentRoot /etc/apache. The 403 error is likely caused by an empty DocumentRoot with Options -Indexes.

However, it sounds like you do not want to host any domains on this machine. If so, turn off Apache, remove any Listen directive (grep -ri Listen /etc/apache) or uninstall it.


NOTE the above assumes that Apache config files are located in /etc/apache However IIRC, the sites-available dir indicates that you're running Apache 2+ so, you may need to change paths to /etc/apache2

share|improve this answer
    
Thanks for replies. Indeed I need to remove it from DNS to have "no server found". And since I had deleted all vhosts it fallbacks to DocumentRoot. –  dreake Sep 22 '11 at 8:52

Now when I'm trying to use this domains, they still redirects to this IP (and it's OK since domains are still assigned to it) but to certain folder I don't know and it results with 403.

And then you expect

When I type the domain name in browser it should end with no server found.

The DNS points to your webserver. Since there is a webserver listening, it replies with whatever it has left (HTTP 403) which probably because of forbidden directory listing.

The other places you must search are DNS servers.

Depends on though on what you want to eventually delete

share|improve this answer

After you change apache configuration, you should reload apache: service apache2 reload.

To test which vhosts are in the current file configuration (as opposed to the running one), run: apache2ctl -D DUMP_VHOSTS -t

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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