|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
New User
My server works fine, i do have to use my static IP address to access my server, but i believe thats ok.
My question - If i just input my IP address http://12.123.12.125 E.g without specifying an actual html doc. I can see the actual htdocs file that my web pages are stored in. Is this normal or should i be placing them else where. Also can they be changed from the outside. I have not really changed any of the files within Apache it is as it was on installation. Regards Phil (New User) |
|
#2
|
|||
|
|||
|
>> I can see the actual htdocs file that my web pages are stored in
htdocs should be a directory, not a file. Say your docroot is: /www/htdocs but when going to your site you are seeing http://12.123.12.125/htdocs/file.html, then you didn't set your docroot correctly. Docroot in URL form is the URI starting from the root at http://12.123.12.125/. I don't quite get your questions. It appears that you might want to hide the Directory listing or perhaps your /www/htdocs/index.html should be displayed automatically when going to http://12.123.12.125/ If so, turn off Indexes: <Directory "/www/htdocs"> Options All -Indexes AllowOverride All ... ... </Directory> To display index.html automatically, look for the line that says: DirectoryIndex index.html index.htm index.php Apache will use index.html first, index.htm second and index.php last. If all 3 are not found and you have -Indexes, then a [403] would be return. |
|
#3
|
|||
|
|||
|
Sorry i did not explain it correctly. I have another site that jumos to my own server. It opens all the correct pages Etc. If i type in just my IP address though which is http://62.254.11.92 you can see the htdocs file as you have said. The example you sent to me, would this cure this. If i was to leave it as it is could my files be altered from the outside.
Thanks Phil |
|
#4
|
|||
|
|||
|
Okay, the docroot is fine. You just need to set home.htm to be your default page:
DirectoryIndex home.htm Just to be safe if you don't want people to see your directory listings, you should add the -Indexes like I mentioned previously. |
|
#5
|
|||
|
|||
|
Thanks for helping me. I have dome the following:
DirectoryIndex home.htm I am a little confused as to the other. I have tried to find it in the http.conf file but cannot find it. Should i actually place that bit of coding into the file, if so could i ask where?? If so, turn off Indexes: <Directory "/www/htdocs"> Options All -Indexes AllowOverride All ... ... </Directory> Sorry to keep bothering you Phil |
|
#6
|
|||
|
|||
|
Put those in httpd.conf somewhere in the middle.
|
|
#7
|
|||
|
|||
|
Thanks
Phil |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > New User |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|