Forum Moderators: phranque
That is for eg., I am involved in one html, and two php based projects, each having different folder structure and unconnected to each other.
But, I have only one document root in the web server httpd.conf file pointing to htdocs So whenever I call the webserver domain it runs the one in teh htdocs directory?
Should I delete each time my project and copy the other files in order to test other projects?
Please Advice.
Thanks.
You want to look into Apache's Virtual Hosts [httpd.apache.org] options.
I have two web applications existing in two different folders I would like to run using project1.exmaple.com and project2.example.com pattern.
Can I do this using virtual host?
my www.example.com (when I use my real domain) is bringing up the htdocs index.html file properly.
under htdocs I have two folders project1 and project2 in which I have the index.php files and a lot others.
I would like to configure my server in such a way that when I call
[project1.example.com...] it should automatically point to the index.php in the htdocs/project1 folder and similarly [project2.example.com...] should point to htdocs/project2 folder.
If I cant do the above I would like to do the same using URL like
www.example.com/project1 and www.example.com/project2 to access the projects in teh project1 and project2 folder respectively is that possible?
Can this be done? Can someone provide answer how I can cofigure the servers to do above (all scenarious).
Please advice thanks a lot.
Is that to be done in virtual hosts or script alias or something. I can try out on my one, but it takes a lot of time to do each trial and error and on top of that, if some mistakes are made, not sure whether these dont work, because of the mistakes I made or, I am in the wrong area of congifuration and things like that!.
Thx.
Just curious;
can I accomplish running two php applications
www.example.com/phpapp1 (htdocs/phpapp1 doc root)
www.example.com/phpapp2 (htdocs/phpapp2 doc root)
By using alias?
(I mean I could have tried this instead of asking here, but I can try only when I go home tonight from work and try this, so by then, I could get the idea whether it can be done the above way or not by discussing here!)
Thanks.
When I used alias nothing happened I just got an empty page. I guess the phps wont get executed with alias!.
I put ;
scriptalais "/php1/" "c:/path/path/php1/"
<directory .. "c:/path/path/php1"> / No ending slash (as it were for the cgi-bin folder)
options.. etc. like that
<end>
I got 403 forbidden message!. I used the same privileges that existed for the 'cgi-bin' directory in the apache httpd.conf file (as it comes).
Can someone tell what could be the issue?