1

Note: I'm a beginner in ubuntu
I've been trying for some time to set XAMPP up on my Ubuntu machine so I can develop my PHP projects. I found out that I can't directly modify the htdocs folder because it is located in a protected part of the system. Then I found out that creating a symbolic link of my /home/(user)/Projects inside my /opt/lampp/htdocs folder would solve it. It kinda did, but not totally. The symbolic link does work because lampp can access the files that are in /home/(user)/Projects but it won't read subfolders. I read something about having to change the permissions but I'd rather avoid it for security purposes. Any idea how to make it work?

  • I'm no expert on apache, but I think a good solution to your problem would be to setup a virtual host that will point to your designated home subfolder as document root. This is done by editing the apache configuration files. Read the documentation on httpd.apache.org/docs/2.2/vhosts There are some examples in there. – hmayag Jun 7 '13 at 21:36
  • I couldn't figure how to work this out by myself, I'm sorry, do you have any simpler solution? I wouldn't mind dabbling with permissions as long as it works – Valmir Junior Jun 7 '13 at 21:50
  • Warning: include(/layouts/header.php): failed to open stream: No such file or directory in /home/valmir/Projects/project1/index.php on line 1 | I get other three identical errors related to other files – Valmir Junior Jun 7 '13 at 21:56
  • Try adding your user to the same group the user running the apache process is. I think it is www-data but I'm not sure. This should give sufficient access rights to the apache process. – hmayag Jun 7 '13 at 22:17
  • Sorry for taking so long to answer, but this didn't fix it. My valmir user is now at www-data group but the error persists. – Valmir Junior Jun 9 '13 at 2:04

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.