useradd -g www-data -m user_name su user_name
git clone /web_repository cd web_repository rm -r vendor composer install php artisan migrate:refresh --seed
/etc/apache2/sites-available/your_site_name.conf ln -s /etc/apache2/sites-available/your_site_name.conf /etc/apache2/sites-enabled/your_site_name.conf chown -R www-data:www-data your_site_name/src/storage
a2enmod rewrite
Contenu du fichier your_site_name.conf : <VirtualHost *:80=""> ServerAdmin postmaster@test1.com ServerName www.your_site_name.domain ServerAlias your_sitie_name_alias DocumentRoot ...your_site_name/src/public/ <Directory your_site_name="" src="" public=""/> Order allow,deny Allow from all Require all granted <IfModule mod_rewrite.c=""> Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </IfModule> Options Indexes FollowSymLinks MultiViews AllowOverride All </Directory> </VirtualHost>
Log in to post a comment.
Create a super user of the website
useradd -g www-data -m user_name
su user_name
Clone the projet :
git clone /web_repository
cd web_repository
rm -r vendor
composer install
php artisan migrate:refresh --seed
Create a virtual vhost :
/etc/apache2/sites-available/your_site_name.conf
ln -s /etc/apache2/sites-available/your_site_name.conf /etc/apache2/sites-enabled/your_site_name.conf
chown -R www-data:www-data your_site_name/src/storage
Activate rewrite mode:
a2enmod rewrite
Contenu du fichier your_site_name.conf :
<VirtualHost *:80="">
ServerAdmin postmaster@test1.com
ServerName www.your_site_name.domain
ServerAlias your_sitie_name_alias
DocumentRoot ...your_site_name/src/public/
<Directory your_site_name="" src="" public=""/>
Order allow,deny
Allow from all
Require all granted
<IfModule mod_rewrite.c="">
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
</VirtualHost>
Last edit: Duy Dinh 2016-03-23