Jump to content
The Uniform Server Community

localhost: accessing webpages on d:/ with server on c:/


Recommended Posts

Is there a way to access files stored on a different partition than the one Uniform Server is installed on?


I have Apache and the rest running from c:/webserver/... but would like to surf to http://localhost/foo/ and view files stored on d:/projects/foo/


I know there are similar threads about this thing, but I have tried some of those with no success.


I need someone to hold my hand and instruct me like talking to a seven-year-old :-)


By the way, Uniform server installation was very simple and clean. Really great work!


Robert Karlsson

Link to comment
Share on other sites

yeah, it should work.. You just have to get the path right... as in Windows style C:\blah\blah... try it and let me know... do you get any error?

Link to comment
Share on other sites

I think I got it right... it's working, so I'm happy.


I changed the httpd.conf in a text editor, and set the


DocumentRoot to D:/projects/project1 (note forward slashes...)


then Directory (further down) to D:/projects/project1/


then at the bottom, I changed VirtualHost *, DocumentRoot to D:/projects/project1


Don't ask me why it worked :-)



Link to comment
Share on other sites

  • 2 weeks later...

I'm having the exact same problem.


Some jerk on an other board keeps telling me to just read the documentation, but that's not much help.


I don't understand why people don't post some example code if they know the answer.


It would be a lot easier to cut and paste the code and tweak the specifics of it.


I see a lot of people on the internet asking this very same question over and over again, but I have yet to find a single satisfactory answer.

Link to comment
Share on other sites

I like examples to bash around. I think the solution you are looking for is to use an alias. This will prevent the problem Olajide stated, “that’s the way to do it but then that means you have disabled W:/www” with an alias the main server root (www) will remain functional and the servers portable.


You need to use a directory alias that has the following general format:


Alias url_path full_path_to_folder


You must place this in httpd.conf (folder *Uniform Server\udrive\usr\local\apache2\conf) for security you cannot use the root .htaccess file in folder www.


Working example:

I have Uniform Server installed in folder: G:\0_1\Uniform Server

I have UniCenter install in folder: H:\a_test\unicenter_mpg_1

To access UniCenter I type the following into the browser address bar:



For the above scenario the configuration file looks like this:


Alias /fred/ "H:/a_test/unicenter_mpg_1/"
<Directory "H:/a_test/unicenter_mpg_1">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all


You can place it either at the end of httpd.conf or locate this section:


Alias /apanel "/home/admin/www/"

Options Indexes Includes

AllowOverride All

Order allow,deny

Allow from all


and place it under that.


Note: Remember to restart the servers for changes to take place.



Back to the original post:


Server is located in folder: c:/webserver

A site contained in folder: d:/projects/foo

To access type into browser address bar: http://localhost/foo/


For this scenario the configuration file looks like this:


Alias /foo/ "d:/projects/foo/"
<Directory "d:/projects/foo">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all


Please note:

Alias: d:/projects/foo/ ---- That last forward slash must be included.

Directory: d:/projects/foo ---- There is no last forward slash.


You can use as many aliases as you like just create a new block of alias code.

This may seem obvious because you are using absolute paths what is aisled is not portable however the main server remains portable.



All the best

Ric :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...