Hi there,
A while ago, I started to publish a website with WordPress.
And recently, I made the natural next step and tried to tweak modules/plugins and play with MySQL/PHP etc.
I had a hard time setting up a local webserver for the development. Whilst the service was running, it is a nightmare with the permissions on the file system level.
(files owned by root, by apache or by my local user; simple errors lead to PHP misbehavior)
What I like to achieve is this:
1) define 2-3 different artificial domains (like mzurhorst-devel1.de, mzurhorst-devel2.de), which shall be delivered from the local apache
(I want to simulate the external webserver and I want to get rid of the "localhost" in the URL because I also plan to work with the rewrite rules etc)
2) I like to have for each of these artificial domains a local directory which is owned by my regular user and where I can edit the files without a hassle
Can you please point me to the right key words that I need to implement?
-- For the domain name part, I assume that I need to add these ones to /etc/hosts and point them to 127.0.0.1.
Is the reminder "only" Apache2 configuration, or is there even another service required?
What is the recommended strategy for the file/folder permissions? -- It seems that Apache does not like to process files that are owned by my local user.
I am used to run chown over the entire folder structure, but this is for sure not the smartest approach?
I also tried to add my user to the group of apache and added the apache user to my own group, but this was not sufficient.
In case this is a security mechanism, is there a possiblity to turn this off for development on the localhost?
Thanks a lot in advance!
Kind regards,
Marcus