root@94aba7ed99b7:~# cd /etc/apache2/sites-available
root@94aba7ed99b7:/etc/apache2/sites-available# vi laravel.conf
<VirtualHost *:80>
ServerAdmin admin@webgori.kr
ServerName localhost
DocumentRoot /var/www/html/laravel-api/public/
<Directory /var/www/html/laravel-api/public/>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
:wq
root@94aba7ed99b7:/etc/apache2/sites-available# cd /etc/apache2/sites-enabled
root@94aba7ed99b7:/etc/apache2/sites-enabled# rm -rf 000-default.conf
root@94aba7ed99b7:/etc/apache2/sites-enabled# ln -s ../sites-available/laravel.conf laravel.conf
root@94aba7ed99b7:/etc/apache2/sites-enabled# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
service apache2 restart
root@94aba7ed99b7:/etc/apache2/sites-enabled# service apache2 restart