Page 1 of 1

Need to Stop and Restart Apache for Port 80 [Solved]

PostPosted: 16. January 2013 22:29
by mlemense
I just installed Apache 1.7.4 on Windows 7. It shows running in XAMPP. When I browse LOCALHOST I get the "I'm ready" default index.html. The only problem is that this is not the default index.html in the XAMPP path (I edited to say "I'm not ready"). Also, I cannot see a list of files/folders when I fully qualify the localhost path (e.g. LOCALHOST/STORE_EXC).

If I stop Apache through XAMPP, and restart, I see "Start Apache Port 80". Now I can view a directory of files/folders when browsing with a fully qualified localhost name as expected in the XAMPP path, but just typing LOCALHOST in browser now gives me an index.php file and not the index.html file that I expected.

It appears that when Apache starts up, it is not specifically using port 80, but when I stop and restart it switches to listening to port 80. Maybe there is a config file somewhere that needs editing? Please help. Thanks Mike L

Re: Need to Stop and Restart Apache for Port 80

PostPosted: 16. January 2013 22:45
by mlemense
Actually, I changed the default HTML "It Works!" to "It doesn't Work" to see if I am pointing Apache to the correct index.html file.

Re: Need to Stop and Restart Apache for Port 80

PostPosted: 17. January 2013 02:21
by JonB
A. You should not be getting the 'It Works' message.

B. You can't 'browse' really using Windows Explorer - it has to be a Web Browser like IE or Firefox or Chrome... They are the only objects designed to parse and render and the source (for anything dynamic) has to be a webserverr of soem sort.

C. and - In part -that would be because on the Index order. When localhost is in the browser address bar, by default XAMPP will serve index.php which is the XAMPP Welcome page. (also, In Apache, if you have an index.html file in a folder it 'turns off' directory folder browsing)

Code: Select all
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
                   default.php default.pl default.cgi default.asp default.shtml default.html default.htm \
                   home.php home.pl home.cgi home.asp home.shtml home.html home.htm
</IfModule>


Good Luck
8)


ycf

Re: Need to Stop and Restart Apache for Port 80

PostPosted: 17. January 2013 19:11
by mlemense
Thanks JonB, this information really helps! Question, what is the file name where I can find the code that you show for the DirectoryIndex? is this the httpd.conf file? Thanks again .... Mike L

Re: Need to Stop and Restart Apache for Port 80

PostPosted: 17. January 2013 19:37
by Altrea
Hi Mike L,

mlemense wrote:what is the file name where I can find the code that you show for the DirectoryIndex? is this the httpd.conf file?

Yes it is. Its around lines 255ff

best wishes,
Altrea

Re: Need to Stop and Restart Apache for Port 80

PostPosted: 18. January 2013 00:25
by JonB
Sorry - My bad - I thought I had mentioned those Directives are found/set in httpd.conf :oops:

Oh well, I was perfect till then :mrgreen:

Good Luck
8)

Re: Need to Stop and Restart Apache for Port 80

PostPosted: 18. January 2013 22:05
by mlemense
Thanks for your help !!