If you’ve installed the Apache HTTP server software on your local machine you might want to change the location where the webpages are located. I.e. move it to “/home/user/public_html” so it’s more accessable for development purposes.
The wiki.archlinux.org wasn’t clear to me about how to solve the forbidden errors I encountered. But the solution was actually simple:
In the file
/etc/httpd/conf/httpd.conf change the path in
DocumentRoot "/srv/http" and
<Directory "/srv/http"> to your local folder (i.e.
User http to
User jakob (in my case)
Than on your local machine add your user-name (jakob in my case) also to the group “http”
Last thing to do is restart the apache server with
sudo systemctl restart httpd
To test the connection make a php-file and put
<?php phpinfo(); ?> in it.
In your browser go to localhost or 127.0.0.1 and hopefully the php config file with all settings are presented there.