Answer the question
In order to leave comments, you need to log in
Creating virtual hosts, permissions and other muck when getting started with linux?
Hello.
I used to create projects on Windows, I decided to switch to Linux, I installed Debian. (I used to use Linux, but I never developed the web in it). I installed Apache2, somehow made the virtual host work and the first question about it. 1) Created a folder /var/www/test and placed index.html in it 2) Created a virtual host file in /etc/apache2/sites-availabel/test.conf with the following content
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName test
ServerAlias www.test.local
DocumentRoot /var/www/test
CustomLog ${APACHE_LOG_DIR}/test.access.log combined
ErrorLog ${APACHE_LOG_DIR}/test.error.log
</VirtualHost>
sudo chown -R $USER:$USER /var/www/test
Answer the question
In order to leave comments, you need to log in
1. test.local must be entered in /etc/hosts, otherwise how will it guess which IP it corresponds to?
2. Apache runs under the username "www-data".
3. After adding the config to /etc/apache2/sites-available, you need to activate it using a2ensite
Translate php under FastCGI and run Apache through suexec and assign rights to the site files to the user.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question