xampp , phpstorm , virtual hosts
Hello everyone. I've got two questions about deployment of my local project folder in browser.
My Windows config is as follows:
- XAMPP installed at D:\DEV\xampp
- several php project folders are located in D:\DEV\sites folder
- C:\Windows\System32\drivers\etc\hosts contains appropriate lines (127.0.0.1 site1, etc)
- D:\DEV\xampp\apache\conf\extra\httpd-vhosts is also modified accordingly
Now, when I start Apache via XAMPP - I can open file D:\DEV\sites\site1\start.php directly in browser via http://site1/start.php
Question 1. - Can I launch somehow in browser the same php file from PhpStorm not via built-in server at http://localhost:63342 but via full-fledged Apache from XAMPP?
Question 2. - What settings have I to do in PhpStorm for this?
Please sign in to leave a comment.
Hi there,
Sure -- you need to define your own Deployment entry (e.g. entry of "In Place" type should work for you) and mark it as Default for this project -- that's where IDE is taking URLs from. If there is no such entry defined then built-in web server is used.
Settings/Preferences | Build, Execution, Deployment | Deployment
Settings - Build, Execution, Deployment - Deployment
- Connection
- Type: "In place"
- Web server root URL: "http://localhost"
- Mappings
- Local path: "D:\DEV\sites\site1"
- Web path on server 'site1': "/"
And can't manage the problem - still "http://localhost:63342/site1/start.php"
Did you marked it as Default?
Sorry, all is working prooperly under apache from xampp!!! - It was my mistake when pointing:
- Connection
- Web server root URL: "http://localhost"
instead of
- Connection
- Web server root URL: "http://site1"
Thanks Andriy - have a good weekend