Documentation/Launching the application/Apache

Apache

The project's public folder includes a .htaccess file with the necessary settings for running the HLEB2 framework.

Before using the framework with Apache, make sure to enable the mod_rewrite module so that the .htaccess file is handled by the server.

Basic configuration of Apache through setup. By default, these settings are already specified in /public/.htaccess, but when using the .htaccess file, ensure that AllowOverride is set to All here.

<VirtualHost *:80>
ServerName mysite.com
# Path to the public folder
DocumentRoot    /var/www/mysite.com/public/

# If .htaccess is not used
<Directory /var/www/mysite.com/public/>
AddDefaultCharset UTF-8
    <IfModule mod_rewrite.c>
      <IfModule mod_negotiation.c>
        Options +FollowSymLinks -MultiViews -Indexes
      </IfModule>
      RewriteEngine on
      # Redirect all requests to index.php
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
    </IfModule>
</Directory>
</VirtualHost>

After starting the server, you can verify the installation by entering the previously assigned (locally or on a remote server) resource address in the browser's address bar.

Running with Nginx RoadRunner Server

Page translated: chatgpt 4-o
Back to top