I just installed apache 2.2 on windows and can't get it to react to my changes. It keeps showing the 'It works!' in the default index.html file. I've changed the DocumentRoot, < Document, and have a index.html in the new location.
DocumentRoot "C:/PersonalWebsite" <Directory "C:/PersonalWebsite"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Order allow,deny Allow from all </Directory> <IfModule dir_module> DirectoryIndex index.html </IfModule>
I don't have any trailing slashes at the end of the URLs, and I've checked the permissions of the directory and file and it's all fine. I can change the content inside the
index.html located at
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs, and I can view the changes in my browser. So somehow, somewhere, it's still referring to the old path. I've also restarted the service after making the changes and it doesn't crash with the URL I've entered. I've also made sure I'm editing the correct httpd config file, through start->programs->apache->edit config file
Okay, so I dont have enough characters to post the full explanation I found to fix this problem, so I'll post it in here.
Okay, so I tried the above to no success. I then tried something else.
- I've been restarting apache through the
start menu->apache->control->restart, and I just tried to stop it again through the menu.
- I then opened up my browser again and I tried to view the page again, and it worked. I checked the apache symbol in the tray, and noticed it was still running. I then stopped the service through that symbol in the tray instead of the start menu, and it changed from
green-> redindicating it stopped.
- I started it up again, and I was flashed a prompt by windows(on a non-admin user account) asking about the
httpdfile. I clicked okay, and went to my browser, and it worked!
So the question is the restart via the menu not a 'true' restart? and this whole time it hasn't been working is because it was still using the old
httpd file? Is this a windows issue-not being an admin account or something else?
Thanks for the suggestions though!