This is a discussion on My Apache test page won't die! within the Linux Web Servers forums, part of the Web Server and Related Forums category; I downloaded Apache and followed the instructions (config, make, make install) and after ironing out a few things in httpd....
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I downloaded Apache and followed the instructions (config, make, make
install) and after ironing out a few things in httpd.conf like the Group #-1, I got it to run. I know it's running because when I open the browser on my other comp and type in my domain name, I get the page saying "If you can see this...". Ok, great. But, when I go into htdocs, there's no index.html. What there is, is a lot of index pages with language extensions. So I copy the index page I want into htdocs, and I get the test page again. Then I delete all the files in htdocs except my index.html page, and still I get the test page. Then I delete the pages in the manual directory, since the test page seems to link to them, and the test page is STILL there. Then I rebooted, tried it, got nothing because I hadn't started the server yet, started the server, and the test page is back, despite there being *nothing* in the htdocs directory anymore. But hey, something's messed up, right? So I go back to the download, config, make, and makeinstall. I get a message that Apache is preserving my directory structure in htdocs, so I go back, delete the directory, go back to the download, config, make, make install. Then I reboot, just in case that has something to do with it, and restart the server. Aaaaaand the test page is back. Either that or it never left. So how do I kill the test page? And how do I get the server to send out my own index.html page? |
|
|||
|
"John Doe" <dev@null.bye> wrote in
news:GmMRe.49606$EX.5018@twister.nyroc.rr.com: > I downloaded Apache and followed the instructions (config, make, make > install) and after ironing out a few things in httpd.conf like the > Group #-1, I got it to run. I know it's running because when I open > the browser on my other comp and type in my domain name, I get the > page saying "If you can see this...". Ok, great. > > But, when I go into htdocs, there's no index.html. What there is, is a > lot of index pages with language extensions. So I copy the index page > I want into htdocs, and I get the test page again. Then I delete all > the files in htdocs except my index.html page, and still I get the > test page. Then I delete the pages in the manual directory, since the > test page seems to link to them, and the test page is STILL there. > Then I rebooted, tried it, got nothing because I hadn't started the > server yet, started the server, and the test page is back, despite > there being *nothing* in the htdocs directory anymore. But hey, > something's messed up, right? So I go back to the download, config, > make, and makeinstall. I get a message that Apache is preserving my > directory structure in htdocs, so I go back, delete the directory, go > back to the download, config, make, make install. Then I reboot, just > in case that has something to do with it, and restart the server. > Aaaaaand the test page is back. Either that or it never left. > > So how do I kill the test page? And how do I get the server to send > out my own index.html page? You're in control here, and apache configuration is very flexible once you understand it. Even when I compile my own apache, I choose to put my site files under /var/www/ in a host-based hierarchy. I use virtual hosts for everything, so I might use something like /var/www/hosts/www.example.com/website/ as the DocumentRoot for a host. In fact, this arrangement is ideal for mass virtual hosting, if you have simple needs. But the point here is that you don't have to use apache's default directory for your site files. Simply (backup and) edit httpd.conf, pointing DocumentRoot to the desired directory. This allows you to leave htdocs untouched, which can be useful for reference. Another useful directive to search for in httpd.conf is DirectoryIndex, where you can see the list of files that are served by default if none is specified in the URL, in order of precedence. If virtual hosts are an advanced topic at this stage, go ahead and change DocumentRoot in httpd.conf. But if you set up your site as a virtual host and leave the stock apache configuration in place, requests from many worms and malicious bots will get the stock pages, making it easier to parse the logs for real visitors. HTH |
| Thread Tools | |
| Display Modes | |
|
|