Big trouble with Port and DocRoot [solved]

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Big trouble with Port and DocRoot [solved]

Postby leonardosampaio » 07. November 2012 23:00

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 =[
leonardosampaio
 
Posts: 10
Joined: 07. November 2012 22:49
XAMPP Version: 1.8.2-4
Operating System: Windows server 2003

Re: Big trouble with Port and DocRoot

Postby Altrea » 07. November 2012 23:12

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
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6844
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: Windows 10 Pro x64

Re: Big trouble with Port and DocRoot

Postby leonardosampaio » 08. November 2012 11:27

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
leonardosampaio
 
Posts: 10
Joined: 07. November 2012 22:49
XAMPP Version: 1.8.2-4
Operating System: Windows server 2003

Re: Big trouble with Port and DocRoot

Postby leonardosampaio » 08. November 2012 19:40

Problem solved!
I set a virtualHost in httpd-vhosts.conf and write Listen 80, Listen 82 on httpd.conf
leonardosampaio
 
Posts: 10
Joined: 07. November 2012 22:49
XAMPP Version: 1.8.2-4
Operating System: Windows server 2003


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 70 guests