Install Apache

Install apache won't take a lot of time.

$ yum install httpd

Do that if you need https support

$ yum install httpd mod_ssl

Then, create a virtual host.

$ vim /etc/httpd/conf.d/vhost.conf

Add those

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/yourproject/public"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/httpd/yourproject-error_log"
CustomLog "/var/log/httpd/yourproject-access_log" combined

<Directory "/var/www/yourproject/public/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted
 <IfModule mod_mime.c>
    AddType application/x-javascript .js
    AddType text/css .css
   </IfModule>
   <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/plain text/xml application/javascript
    <IfModule mod_setenvif.c>
        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4.0[678] no-gzip
        BrowserMatch bMSIE !no-gzip !gzip-only-text/html
    </IfModule>
    </IfModule>
    Header append Vary User-Agent env=!dont-vary
</Directory>
</VirtualHost>

Last thing is start httpd

$ systemctl start httpd
$ systemctl enable httpd

results matching ""

    No results matching ""