Page 1 of 1

Big trouble with Port and DocRoot [solved]

PostPosted: 07. November 2012 23:00
by leonardosampaio
Hello,
how can i set apache to behave like that:
when i access localhost it opens a folder outside xampp/htdocs ( more specific in C: ), but when i navigate inside that page, i can access htdocs folders?

for example:
rootDocument is C:\something\ and inside C:\something\index.php there are links to C:\xampp\htdocs\whatever...

I hope someone can help me, i'm really worried about that here in my job =[

Re: Big trouble with Port and DocRoot

PostPosted: 07. November 2012 23:12
by Altrea
Hi leonardosampaio,

leonardosampaio wrote:how can i set apache to behave like that:
when i access localhost it opens a folder outside xampp/htdocs ( more specific in C: ), but when i navigate inside that page, i can access htdocs folders?

for example:
rootDocument is C:\something\ and inside C:\something\index.php there are links to C:\xampp\htdocs\whatever...

Either define more then one virtual hosts with unique domain names and use this new Domain Names in your Links
or define Apache Alias zu fit your needs.

In all ways, that will be not a clean solution and i don't have any idea if their exist any situation i would configure Apache that way.
Maybe there is a better solution for your needs, but for that we need to know why you want to do that.

best wishes,
Altrea

Re: Big trouble with Port and DocRoot

PostPosted: 08. November 2012 11:27
by leonardosampaio
Ok,
let me try to explain:
I work on a company where there are some web systems hosted on this local xampp server and it is enable to access from anywhere by a domain.
It was working fine, but i disconfigured that apache config files by mistake so now i have to fix it to behave this way.
Access by the domain:80 with documentroot outside htdocs, and allow navigate inside htdocs with :82

Re: Big trouble with Port and DocRoot

PostPosted: 08. November 2012 19:40
by leonardosampaio
Problem solved!
I set a virtualHost in httpd-vhosts.conf and write Listen 80, Listen 82 on httpd.conf