Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cd ~
- mkdir www
- mkdir -p www/example.com/{public,log,backup}
- sudo gedit /etc/apache2/sites-available/site.ru.conf
- ---
- # domain: site.ru
- # public: /home/user/www/site.ru/
- <VirtualHost *:80>
- # Admin email, Server Name (domain name), and any aliases
- ServerAdmin webmaster@site.ru
- ServerName www.site.ru
- ServerAlias site.ru
- # Index file and Document Root (там, где расположены публичные файлы сайта)
- DirectoryIndex index.html index.php
- DocumentRoot /home/user/www/site.ru/public
- # Это для того, чтобы не было ошибок доступа + корректно работал .htaccess
- <Directory "/home/user/www/site.ru/public">
- AllowOverride All
- Order allow,deny
- Allow from all
- Require all granted
- </Directory>
- # Log file locations
- LogLevel warn
- ErrorLog /home/user/www/site.ru/log/error.log
- CustomLog /home/user/www/site.ru/log/access.log combined
- </VirtualHost>
- ---
- sudo a2ensite site.ru.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement