mapping local project to local XAMPP Follow
Hallo to all of you,
my problem is to use XAMPP as local server but developing sources not in htdocs.
In htdocs I have one folder for each customer. In this folder I use many different websites in sub structures. For development I use folders at the same windows7 machine but outside of htdocs.
As a phpStorm beginner I recognize server definition for connecting sites in htdocs and mapping for transfer of documents between server and non htdoc folders.
I read the manual but often wording seams to be a problem for me. Development should made in Project folder. I think in my case it is the folder not 'in place' the server. Before I can test the new code phpStorm transfer new code into mapped folder in htdocs and then I can debug... from server. If I'm wrong please help me.
My case
-----------
Server root: C:\xampp\htdocs
Different websites: C:\xampp\htdocs\customerA\Site1, C:\xampp\htdocs\customerA\site2... and so on.
'Project' folders not 'in place': C:\user\me\draftA\Site1, C:\user\me\draftA\site2...
I would like to make changes in C:\user\me\draftA\Site1 (in my oppinion the Project).
Up to now I copy anything to the Server in C:\xampp\htdocs\customerA\site1 und test it in Chrome with localhost/customerA/Site1/index.html
What I try in phpStorm to get rid of manually transfer
---------------------------------------------------------------------
New Project from existing folder
- definition of server
type: local or mounted folder (hope it is correct)
name: I_XAMPP (for further use in all projects in different projects)
folder: C:\xampp\htdocs (neboulus 'Upload/download project files' - I think this is the root of XAMPP )
Web server root URL: http://localhost
- definition of mapping
Local path: C:\users\me\draftA\Site1
Deployment path on server 'I_XAMPP' (relative to folder 'C:\XAMPP\htdocs): customerA\site1
Web path on server 'I_XAMPP': customerA/site1
Project url shown is http://localhost/customerA/Site1. This seams my way but warning in dialog footer "Local path 'C:\user\me\draft\site1 is out of project".
I don't use button the button 'Use this server as default'.
I submit this settings and try to transfer sources from C:\user\me\draft\site1 to C:\xampp\htdocs\customerA\Site1 anyway, in the oppinion the warning only is a hint of local not in-place server.
For that I try menu "Tools/Deployment/Upload here" but any transfer entry in submenu is inactive.
Where are my misunderstandings? I hope some of you can help me.
Thanks up to now,
Matthias
Please sign in to leave a comment.
If you are on the same machine, you don't need to
tranfer your files from your dev folder to htdocs to make it work. It's useless.
Just add a VirtualHost on your apache conf and you'll be able to see your project directly from your original sources giving you the way to use directly xdebug and other mechanisms.
For instance, my projects are all located inside a folder: c:\Users\Fabio\DropBox\devs\project_name
I have added this section to my apache conf :
<IfModule alias_module>
Alias /dev c:/Users/Fabio/DropBox/devs
<Directory c:/Users/Fabio/DropBox/devs>
Options All
AllowOverride All
Require all granted
</Directory>
</IfModule>
Like this, all my projects can be reached from http://localhost/dev/project_name
Hallo Fabio
In my case it is not one folder with projects and this folders often change. Sometimes at one day - all the projects are very short. So I need to be very felxible with my folders.
A VirtualHost is one way and may in some cases usefull. Thanks for the hint. I'll may use it at some special cases. It works quickly without changings in hosts file.
But customizing for VirtualHosts seams to change with different apache releases and from time to time I loose were I find the apache config files and also the host file. Administration of systems/server is not mine ;), I prefer to use them mostly in basic configuration.
There are some reasons to copy. One is, I would like to handle with deployment on my machines. Another reason is, that in my develop folders are also many other files out of develop scope.
In phpStorm manual I read that it is possible to copy, unless a local or a remote server.
So I search the way to do this local and to train how phpStorm works.
I Hope someone is able to show me how to configure it in diescribed case above.
Thank's a lot,
Matthias
Newbie here, but could you not just change the apache httpd.conf to:
DocumentRoot "c:/myProjects/customerA\site2"
<Directory "c:/myProjects/customerA\site2">
#DocumentRoot "C:/xampp/htdocs"
#<Directory "C:/xampp/htdocs">
It's what I do for my 3 student Projects:p
Sorry that changings in config are no way in my case. I don't like to study Server-Administration on several machines. Im searching for more productive way.
I use the others way's like you discribed up to now.
Of course I do it 10... times a day and sometimes on physical different machines.
I just seach the way via deployment in phpStorm.
Is there anyone using deployment in phpStorm?
Thanks,
Matthias