make "localhost" point to a subdirectory of Apache server
Really this is for Mac OS X, but I figure I can apply linux thinking to the topic.
So thinking in terms of Linux, is it possible to do the following, and if so how? What I want to do is be able to type something like http://localhost/ (though something different would be used) and have it redirect me to http://localhost/some/subdirectory/. I don't know much about Apache, or anything else to do with servers, but this is the easiest way for me to implement a free database at work for keeping track of lab cultures, enzymes, etc (microbiology lab stuff). Right now I have it working great, with PHP. mySQL and Apache running perfectly together, but the people I work with won't use it unless it is incredibly easy to use, so having a long url to remember won't cut it. We also use 3 different web browsers, so putting bookmarks in them works, but isn't the best solution. I was thinking if it was possible to just set something like http://labdb/ to redirect to the database that would be awesome, unfortunately I don't know how to do this. Any suggestions? |
first of all you may change the root directory in http.conf:
Code:
# or since you use php, you may use something like this: Code:
<?php P.S. I don't like web programming and I'm not good at. It's just the first thing that crossed my mind when I read your thread. So I don't know if this is the best solution, but I cannot think of any reason why this wouldn't work. |
Unfortunately Mac OS X is setup a specific way, and it is very difficult to change global settings like that...at least if I understand you right.
The other thing is that I don't want to change the entire server structure, I just want to have a local URL that is really short, but redirects to a certain location. I know there are things like virtual server settings which are kinda like what I want to do, but they seem overly complicated for something that seems like it should be easy to do. |
All times are GMT -5. The time now is 10:54 PM. |