Softaculous


Topic : Absolute paths with multiple domains


Posted By: matsaukeo on April 12, 2014, 9:10 pm
Hi there,

I've created multiple domains (e.g. localhost/mysite )

but I prefer to have all my paths relative to the root (so for example the path to my css file is always /includes/css/style.css

When using multiple domains, my path is always broken. When I used xammp, I edited the config file to set up virtual hosts but from reading around it sounds like I shouldn't edit these files and that there may be a way in the gui to do it

Is there any way to do this? if not, how can I have multiple sites but with absolute paths for all the files?

much appreciated (again!!)


Posted By: tidus on April 14, 2014, 9:42 am | Post: 1
Hi,

Yes. Ampps does create a domain from enduser panel. Don't forget to check the checkbox in Advance seettings to add an entry to host file if you have not configured the DNS
(ignore the red message if it arises, check the checkbox anyway, as we can add the entry manually)

Although if you know how to create virtual hosts, you can create a new file in the same location lets say my-vhosts.conf and include it in the Apache Configuration just like httpd-vhosts.conf


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: matsaukeo on April 15, 2014, 7:13 pm | Post: 2
Thanks for the reply but to be honest I think I may be in way over my head!

If I added a host file, can I then use absolute paths? If so, are there some instructions anywhere?...

...Or are you saying that I need to set up a host file for virtual hosts anyway?

In xammps there was a specific file somewhere that I added new entries for and then I had to edit a windows system file somewhere to add the path's to. Is there any tutorial or documentation that I can follow?

Again thanks for your help!


Posted By: tidus on April 16, 2014, 6:53 am | Post: 3
Hi,

What you used to do manually in XAMPP is done by Ampps in the enduser panel. You just need to provide the path and domain name. Yes, hosts file is present in Widows directory(C:\Windows\System32\drivers\etc\hosts). AMPPS even changes that(if he gets the permission)

Check the attached screenshots.

You can check the host file contents in manage domain page if the entry was added or not, add it manually if it wasn't.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: matsaukeo on April 16, 2014, 8:16 am | Post: 4
thanks - will give that a go. Does it make any difference that all my files are hosted on dropbox? I created a symlink using terminal like this

Code
mv /Applications/AMPPS/www /dropbox/www
ln -s /dropbox/www /Applications/AMPPS/www


Thanks...

Posted By: matsaukeo on April 18, 2014, 2:06 pm | Post: 5
thanks  - all sorted now. would you mind confirming something for me? When I delete and add domains using the end panel, does it create any files? At this point it's just creating links really isn't it?

Thanks again - this is just what I need at the moment.

Posted By: tidus on April 30, 2014, 5:43 am | Post: 6
Quote From : matsaukeo April 18, 2014, 2:06 pm
would you mind confirming something for me? When I delete and add domains using the end panel, does it create any files? At this point it's just creating links really isn't it?


Hi,

Adding/Deleting Domains from Enduser Panel modifies the vhosts configuration file of Apache.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.