B
B
buryakov_dima2015-08-07 08:35:44
linux
buryakov_dima, 2015-08-07 08:35:44

How to properly set up apache on ubuntu?

Good day friends, I am a beginner user of Linux distribution ubuntu 15.04. I installed the webserver:

apache2, php5, php5-mysql, mysql-server, phpmyadmin

Everything works, but there is one problem. In order to upload files there (var / www) or edit something, you need to constantly go there as root.
I looked at several examples on the Internet on the topic of virtual hosts, but there was also a problem, the site located in the home (written in php) refused to work normally because it turned out that the creator of those files was a regular user, and apache, as I understood it, could only use files owned by root.
How to properly configure apache? So that you can easily edit files, etc. without root, and that everything would work fine.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2015-08-07
@buryakov_dima

I advise you to install additional apache2-mpm-itk so that apache is run on behalf of the user, and not from www-data
, or a completely unsafe way - rights 0777 to the directory

O
OnYourLips, 2015-08-07
@OnYourLips

It is correct to run the webserver as the user who owns the files.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question