Skip to content

Instantly share code, notes, and snippets.

@huiralb
Created September 5, 2021 08:16
Show Gist options
  • Save huiralb/782456b22dc227c028b65f35bc68b77d to your computer and use it in GitHub Desktop.
Save huiralb/782456b22dc227c028b65f35bc68b77d to your computer and use it in GitHub Desktop.
Tutorial install Laravel di centos 7
1. Install Apache
sudo yum update httpd
sudo yum install httpd
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
sudo systemctl start httpd
sudo systemctl status httpd
2. Virtual Hosts
vim /etc/httpd/conf.d/vhost.conf
```
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@example.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/html/example.com/public/
ErrorLog /var/www/html/example.com/logs/error.log
CustomLog /var/www/html/example.com/logs/access.log combined
</VirtualHost>
```
sudo mkdir -p /var/www/html/example.com
sudo mkdir -p /var/www/html/example.com/logs
2. vim `/etc/httpd/conf.d/vhost.conf`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment