Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
962
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.00 KB | None | 0 0
  1. cd ~
  2. mkdir www
  3. mkdir -p www/example.com/{public,log,backup}
  4. sudo gedit /etc/apache2/sites-available/site.ru.conf
  5. ---
  6. # domain: site.ru
  7. # public: /home/user/www/site.ru/
  8.  
  9. <VirtualHost *:80>
  10.   # Admin email, Server Name (domain name), and any aliases
  11.   ServerAdmin webmaster@site.ru
  12.   ServerName  www.site.ru
  13.   ServerAlias site.ru
  14.  
  15.   # Index file and Document Root (там, где расположены публичные файлы сайта)
  16.   DirectoryIndex index.html index.php
  17.   DocumentRoot /home/user/www/site.ru/public
  18.  
  19.   # Это для того, чтобы не было ошибок доступа + корректно работал .htaccess
  20.   <Directory "/home/user/www/site.ru/public">
  21.     AllowOverride All
  22.     Order allow,deny
  23.     Allow from all
  24.     Require all granted
  25.   </Directory>
  26.  
  27.   # Log file locations
  28.   LogLevel warn
  29.   ErrorLog  /home/user/www/site.ru/log/error.log
  30.   CustomLog /home/user/www/site.ru/log/access.log combined
  31. </VirtualHost>
  32. ---
  33. sudo a2ensite site.ru.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement