Apache2 multiple php subdirectory inside container proxy docker

sudo a2enmod rewrite
sudo a2enmod proxy
sudo a2enmod proxy_fcgi
sudo a2enmod headers
<VirtualHost *:80>
    DocumentRoot /var/www/html

    Alias /laravel /var/www/html/laravel/public
    <Directory /var/www/html/laravel/public>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
        <FilesMatch \.php$>
                # From the Apache version 2.4.10 and above, use the SetHandler to run PHP as a fastCGI process server
                SetHandler "proxy:unix:/run/php/php8.2-fpm.sock|fcgi://localhost"
            </FilesMatch>
    </Directory>

  <Location /laravel>
        LimitRequestBody 20000000000
        Header set Access-Control-Allow-Origin "*"
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
    </Location>

 ####################################################
 ###########

   Alias /docconvert /var/www/html/docconvert/public
    <Directory /var/www/html/docconvert/public>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
        <FilesMatch \.php$>
                # From the Apache version 2.4.10 and above, use the SetHandler to run PHP as a fastCGI process server
                SetHandler "proxy:unix:/run/php/php8.2-fpm.sock|fcgi://localhost"
            </FilesMatch>
    </Directory>

  <Location /docconvert>
        LimitRequestBody 20000000000
        Header set Access-Control-Allow-Origin "*"
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
    </Location>

    ############
 ####################################################
</VirtualHost>

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *