Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Virtual Files & Directories

Posted on 2013-12-06
1
Medium Priority
?
373 Views
Last Modified: 2013-12-10
Hello Experts,

I currently have 2 web servers: My local (test) is Win7/IIS7 and my Live is Win2003/IIS6/Plesk

I have the following domains, subdomains, and directories:

- abc.com
- abc.com/admin
- abc.com/includes

- test.abc.com*
- test.abc.com/admin*
- test.abc.com/includes*

- abc123.com
- test.abc123.com*

Those with * are on my Live server only, the remaining are on both.

I'm using abc.com/includes for lot of things, including file includes for abc.com/admin, abc.com/cart, ..., and as virtual include for abc123.com/cart, abc123/payments, etc.

The intention of test.abc.com/includes, however, is to serve test.abc.com/admin, which is my server test site before I launch live.  I also use test.abc.com/includes to test my includes as well.  All files in test.abc.com/includes are exactly the same as in abc.com/includes, EXCEPT that in one include I have location = "test" in the other location = "live" which I use as a switch to connect to my live or test db.

So, when I upload file.asp to abc.com/admin - it connects to my live db; when I upload it to test.abc.com/admin - it connects to my test db - I don't have to change a thing in file.asp, the switch is in my include.

With everything said above, I need to MOVE abc.com/admin to abc123.com/admin (my client wants it moved, not redirected so he can see the URL), and I'm not sure how, especially if I want to keep my includes working the way they are?

My first thought was changing include file=... to include virtual=... - this worked on my local Win7, but when I upload it to test.abc123.com/admin I get

Active Server Pages error 'ASP 0126' 

Include file not found 

/admin/Index.asp, line 3 

The include file 'includes/common.asp' was not found. 

Open in new window



My next question is, why is the VIRTUAL working locally, bot not on the server (mind you- pages from abc123.com/cart are already successfully reaching abc.com/includes)?  Do I need to give permission specififically to test.abc123.com, and if so, how?  

Does Plesk have a seperate user for abc123.com and seperate for test.abc123.com?  How can I find out?

I realize when I get test.abc123.com/admin working, it would be connecting to my live includes.  Without changing my code in admin/*.asp, is there a way of setting up, so when i call include VIRTUAL=... from test.abc123.com it uses test.abc.com/includes, but when I call it from abc123.com it uses abc.com/includes? Or, I'm open to suggestions.

Finally, is there a way to get a listing of all virtul directories?

Any feedback would be greatly appreciated

Thank you!
0
Comment
Question by:APD_Toronto
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 total points
ID: 39703608
First of all, you should have parents paths turned off for security reasons.  This would not allow  you to use <!-- #include file ="includes/common.asp" -->  or <!-- #include file ="../includes/common.asp" -->

If you have abc.com and can surf to abc.com/includes/common.asp then your include code would be

<!-- #include virtual ="/includes/common.asp" -->

If you have abc.com and can surf to abc.com/admin/includes/common.asp then your include code would be

<!-- #include virtual ="/admin/includes/common.asp" -->
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question