Laravel:Installasi: Difference between revisions
Created page with "Let's first install a webserver to host the Laravel application. You can either use Apache or Nginx web server. Here I am using an Apache web server. To install apache2, type: <syntaxhighlight lang="bash"> sudo apt install apache2 </syntaxhighlight> Once installed, Apache should be running. If it's not, for whatever reason, start it: <syntaxhighlight lang="bash"> sudo systemctl start apache2 </syntaxhighlight> Then enable it to start on boot time. <syntaxhighlight..." |
|||
| Line 158: | Line 158: | ||
Next, past the content shown and replace the example.com ServerName directive with the FQDN or public IP of the server ( Or private IP in case the server is on a LAN network ). | Next, past the content shown and replace the example.com ServerName directive with the FQDN or public IP of the server ( Or private IP in case the server is on a LAN network ). | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="apacheconf" line="1"> | ||
<VirtualHost *:80> | <VirtualHost *:80> | ||
ServerName example.com | ServerName example.com | ||
ServerAdmin admin@example.com | ServerAdmin admin@example.com | ||
DocumentRoot /var/www/html/laravelapp/public | DocumentRoot /var/www/html/laravelapp/public | ||
<Directory /var/www/html/laravelapp> | |||
AllowOverride All | <Directory /var/www/html/laravelapp> | ||
</Directory> | AllowOverride All | ||
ErrorLog ${APACHE_LOG_DIR}/error.log | </Directory> | ||
CustomLog ${APACHE_LOG_DIR}/access.log combined | |||
ErrorLog ${APACHE_LOG_DIR}/error.log | |||
CustomLog ${APACHE_LOG_DIR}/access.log combined | |||
</VirtualHost> | </VirtualHost> | ||
</syntaxhighlight> | </syntaxhighlight> | ||