0

I set up the PHP environment with XAMPP on Mac. I want to change the default web directory to my workspace. I found this and it did help.

But my question is where the httpd.conf is placed?

I found one under /XAMPP/xamppfiles/apache2/conf, but it's not same as what I opened from XAMPP manager.

Then where's the httpd.conf opened from XAMPP manager? And what's the relationship and difference between these two httpd.conf?

Community
  • 1
  • 1
Sky
  • 7,343
  • 8
  • 31
  • 42
  • You mean [DocumentRoot](http://httpd.apache.org/docs/2.4/mod/core.html#documentroot) as in _httpd_.conf? – VolkerK Jul 15 '15 at 07:30
  • No, I mean `php.ini`. – Sky Jul 15 '15 at 07:43
  • 2
  • @VolkerK Sorry, I just found that it's httpd.conf, that's why I didn't find it. I'm new to php. It's really embarrassing. Let me check again. – Sky Jul 15 '15 at 07:50
  • Do you know where's the `httpd.conf`, I found one under `xamppfiiles/apache2/conf`, but seems it's not the right one. – Sky Jul 15 '15 at 07:53
  • `xamppfiiles/apache2/conf` sounds right to me. There can be [INCLUDE](http://httpd.apache.org/docs/2.4/mod/core.html#include) directives in the httpd.conf. E.g. https-hosts are sometimes configured in another .conf file which is then included into the "main" httpd.conf. – VolkerK Jul 15 '15 at 08:05
  • Alias /bitnami/ "/Applications/XAMPP/xamppfiles/apache2/htdocs/" Alias /bitnami "/Applications/XAMPP/xamppfiles/apache2/htdocs" Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all This is the content of `httpd.conf` under `xmappfiles/apache2/conf`, no INCLUDE found. – Sky Jul 15 '15 at 09:16
  • According to [the documentation](http://httpd.apache.org/docs/2.4/mod/core.html#documentroot) the default value of DocumentRoot is `/usr/local/apache/htdocs` – VolkerK Jul 15 '15 at 10:23
  • Yes, I just want to change it to my workspace. – Sky Jul 15 '15 at 13:46
  • Then just add a DocumentRoot directive. – VolkerK Jul 15 '15 at 13:47
  • Yes, I changed the value of `DocumentRoot` to my own folder, but it shows `Access forbidden!` when I'm accessing `localhost`. Do you know what's going on? – Sky Jul 16 '15 at 01:19
  • Sounds like a problem with file system permissions. Your httpd process has no access to your ~home directory (or subdir). – VolkerK Jul 16 '15 at 01:23
  • I've changed it to folder `Developer` and tried to change the mode to 777, and it didn't work. – Sky Jul 16 '15 at 01:40

0 Answers0