Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use alias directory in htdocs of xampp on mac?

Tags:

php

apache

xampp

I installed Xampp on mac and I'm going to run my web application on local, which located on "/Data/MyApp/App".

I know I should put source codes inside htdocs. So I created an alias of "App" by right click -> Make Alias and put it to "Applications/Xampp/htdocs/". I changed alias name test. When I run localhost/test on chrome browser, I see empty screen but downloads unknown file test.

Instead, I paste whole sources(App) to htdocs with name test2 and localhost/test2 shows me correct screen according to the index.php inside of test2. Just note that file structures of test and test2 are exactly same.

Applications/Xampp/htdocs/test(alias)/index.php         // not working
Applications/Xampp/htdocs/test2(real folder)/index.php  // work well

What's wrong with this? Should I set something for making alias folder work inside htdocs?

like image 542
Roy Wang Avatar asked Oct 25 '25 02:10

Roy Wang


1 Answers

Well, after struggling a few hours, I found what I was wrong. I removed alias folder which I created by right click -> Make Alias and created new one with this command.

cd /Applications/XAMPP/htdocs
ln -s /Data/MyApp/App test

I'm not sure what was wrong with original alias.

like image 182
Roy Wang Avatar answered Oct 26 '25 17:10

Roy Wang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!