|
|
|
|
||||||
| comp.info.servers.win Web servers for MS Windows and NT. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
I use winxp.
I use xampp from apachefriends.org and are extremely pleased with the programs. The installation went like a dream. One question: At the moment, when I use localhost, I put all the php files I write in the folder ...\apache php mysql etc\xampp\htdocs\xampp, however I would like to put them in various folders like c:\php files\project1\, c:\php files\project 2, and even on my usb stick like e:\php files\project1\. Can this be done? How do I easily change between the folders? I am grateful for any ! Regards, Jan Nordgreen |
|
|
|
#2 (permalink) |
|
Messages: n/a
Hébergeur: |
On 19 Jul 2005 08:01:27 -0700, "damezumari" <jannordgreen@gmail.com>
wrote: >I use winxp. > >I use xampp from apachefriends.org and are extremely pleased with the >programs. The installation went like a dream. > >One question: > >At the moment, when I use localhost, I put all the php files I write in >the folder ...\apache php mysql etc\xampp\htdocs\xampp, however I would >like to put them in various folders like c:\php files\project1\, c:\php >files\project 2, and even on my usb stick like e:\php files\project1\. > >Can this be done? How do I easily change between the folders? > >I am grateful for any ! > >Regards, > >Jan Nordgreen Jan, Can you use virtual hosts with xampp? I'm using the standard Apache 2.0.52 under WinXP on my development machine -- and I just create different directories for different projects, set them up as virtual hosts, set them up in c:\windows\system32\drivers\etc\hosts to point to 127.0.0.1 -- and then restart Apache. An example listing in the hosts file is: 127.0.0.1 test tnw nw thenextwindow testing apache http manual each of those is a virtual host, all pointing to 127.0.0.1. The httpd.conf file's virtual host directives point to each's "root" directory. For some examples of my setup, you can see a discussion in my web design forums at http://www.terrystockdale.com/forums...opic.php?t=165 Terry My weekly newsletter: http://www.terryscomputertips.com |
|
|
|
#3 (permalink) |
|
Messages: n/a
Hébergeur: |
Hi Terry,
Thanks a lot for your advice! I followed it like this. 1. I opened the file C:\WINDOWS\system32\drivers\etc\hosts in a text editor and changed the only instruction from 127.0.0.1 localhost to 127.0.0.1 localhost calendar 2. I opened the file ...\xampp\apache\conf\httpd.conf in a text editor and added these instructions. NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "E:\programming\php programs\dx" ServerName calendar </VirtualHost> 3. I copied all the files in my dx project to the folder E:\programming\php programs\dx. 4. I restarted apache. 5. I typed this url in my web browser: http://calendar/dx_login.php. Vuaw! The file was found and did its job as when it was in its original folder. In short: it worked! I gave the steps a bit detailed in case others would like to do the same and need a bit more details. Also, if I did something inappropriate when it comes to security, or what have you, please tell me. Thanks again for your ! Regards, Jan Nordgreen |
|
|
|
#4 (permalink) |
|
Messages: n/a
Hébergeur: |
Hi Terry,
Thanks a lot for your advice! I followed it like this. 1. I opened the file C:\WINDOWS\system32\drivers\etc\hosts in a text editor and changed the only instruction from 127.0.0.1 localhost to 127.0.0.1 localhost calendar 2. I opened the file ...\xampp\apache\conf\httpd.conf in a text editor and added these instructions. NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "E:\programming\php programs\dx" ServerName calendar </VirtualHost> 3. I copied all the files in my dx project to the folder E:\programming\php programs\dx. 4. I restarted apache. 5. I typed this url in my web browser: http://calendar/dx_login.php. Vuaw! The file was found and did its job as when it was in its original folder. In short: it worked! I gave the steps a bit detailed in case others would like to do the same and need a bit more details. Also, if I did something inappropriate when it comes to security, or what have you, please tell me. Thanks again for your ! Regards, Jan Nordgreen |
|
![]() |
| Outils de la discussion | |
|
|