Apache Configuration

⌘K
  1. Home
  2. Docs
  3. Botmerze – AI Support &#0...
  4. Instruction
  5. Apache Configuration

Apache Configuration

If using Apache (/etc/apache2/sites-available/botmerze.conf):

<VirtualHost *:80>
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com

    DocumentRoot /home/<domain>/public_html

    <Directory /home/<domain>/public_html>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    # Block direct access to Laravel application folder
    <Directory /home/<domain>/public_html/core>
        Require all denied
    </Directory>

    # Block sensitive files
    <FilesMatch "^\.env|composer\.(json|lock)|package(-lock)?\.json|artisan$">
        Require all denied
    </FilesMatch>

    ErrorLog  ${APACHE_LOG_DIR}/botmerze-error.log
    CustomLog ${APACHE_LOG_DIR}/botmerze-access.log combined
</VirtualHost>

Root .htaccess (already shipped with BotMerze) handles Laravel front-controller routing. Make sure mod_rewrite and mod_headers are enabled:

sudo a2enmod rewrite headers
sudo a2ensite botmerze.conf
sudo a2dissite 000-default.conf
sudo apache2ctl configtest
sudo systemctl reload apache2
Was this article helpful to you? No Yes

How can we help?