Configuration Apache
Complete Apache setup guide for FeedbackPulse SaaS.
Prerequis
- Apache 2.4+
mod_rewriteenabledmod_headersenabled (for security headers)- PHP 8.2+ (via
mod_phpor PHP-FPM)
Enable Required Modules
sudo a2enmod rewrite headers ssl
sudo systemctl restart apache2
Basic Virtual Host
Create a new virtual host file:
sudo nano /etc/apache2/sites-available/feedbackpulse.conf
Paste the following:
<VirtualHost *:80>
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/feedbackpulse-saas/public
<Directory /var/www/feedbackpulse-saas/public>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
# Logging
ErrorLog ${APACHE_LOG_DIR}/feedbackpulse-error.log
CustomLog ${APACHE_LOG_DIR}/feedbackpulse-access.log combined
</VirtualHost>
Enable the site and restart:
sudo a2ensite feedbackpulse.conf
sudo a2dissite 000-default.conf # Disable default site (optional)
sudo systemctl restart apache2
HTTPS Virtual Host (with Let's Encrypt)
After obtaining an SSL certificate:
<VirtualHost *:443>
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/feedbackpulse-saas/public
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/yourdomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/yourdomain.com/privkey.pem
<Directory /var/www/feedbackpulse-saas/public>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
# Security Headers
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-Content-Type-Options "nosniff"
Header always set X-XSS-Protection "1; mode=block"
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
ErrorLog ${APACHE_LOG_DIR}/feedbackpulse-ssl-error.log
CustomLog ${APACHE_LOG_DIR}/feedbackpulse-ssl-access.log combined
</VirtualHost>
# Redirect HTTP to HTTPS
<VirtualHost *:80>
ServerName yourdomain.com
ServerAlias www.yourdomain.com
Redirect permanent / https://yourdomain.com/
</VirtualHost>
Wildcard Subdomain Support (Optional)
If you want tenant subdomains like acme.yourdomain.com:
<VirtualHost *:443>
ServerName yourdomain.com
ServerAlias *.yourdomain.com
DocumentRoot /var/www/feedbackpulse-saas/public
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/yourdomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/yourdomain.com/privkey.pem
<Directory /var/www/feedbackpulse-saas/public>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Important : You also need a wildcard DNS record (
*.yourdomain.com) and a wildcard SSL certificate. See Wildcard DNS Setup and SSL Certificates.
The .htaccess File
FeedbackPulse ships with a .htaccess file in the public/ directory. It handles:
- URL rewriting (pretty URLs without
index.php) - Forcing HTTPS
- Setting security headers
If your .htaccess is not working, make sure AllowOverride All is set in your virtual host configuration.
The default .htaccess includes:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
And in public/.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
cPanel / Shared Hosting
If you're on hebergement mutualise with cPanel:
Option A: Install in public_html
- Upload all files to
public_html/feedbackpulse/ - In cPanel → Domains or Addon Domains, set the document root to
public_html/feedbackpulse/public - If you can't change the document root, use this trick:
Create a .htaccess in your public_html/ root:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ feedbackpulse/public/$1 [L]
</IfModule>
Option B: Install in a Subdomain
- Create a subdomain in cPanel (e.g.,
feedback.yourdomain.com) - Set its document root to the
public/folder - Upload all FeedbackPulse files to the subdomain directory
Option C: Move public/ Contents
As a last resort on restrictive hosting:
- Upload all files to a directory outside
public_html/(e.g.,/home/user/feedbackpulse/) - Copy the contents of
public/intopublic_html/ - Edit
public_html/index.php— update the paths:
// Change this:
require __DIR__.'/../vendor/autoload.php';
// To this:
require '/home/user/feedbackpulse/vendor/autoload.php';
// Change this:
$app = require_once __DIR__.'/../bootstrap/app.php';
// To this:
$app = require_once '/home/user/feedbackpulse/bootstrap/app.php';
Avertissement : Option C requires updating paths after every update. Use Option A or B if possible.
Laragon (Windows Local Development)
Laragon makes this incredibly easy:
- Place the
feedbackpulse-saasfolder inC:\laragon\www\ - Laragon automatically creates a virtual host:
feedbackpulse-saas.test - Visit
http://feedbackpulse-saas.testin your browser - Laragon points to
public/automatically!
Laragon auto virtual host: Laragon creates Apache virtual hosts for every folder in
www/. The document root is automatically set topublic/if that directory exists.
Verify Apache Configuration
# Test configuration syntax
sudo apachectl configtest
# Check if mod_rewrite is enabled
apache2ctl -M | grep rewrite
# Check if site is enabled
ls /etc/apache2/sites-enabled/
# Restart Apache
sudo systemctl restart apache2
Visit https://yourdomain.com — you should see the FeedbackPulse page d'accueil or installer.
Etapes Suivantes
- SSL Certificates — set up HTTPS
- Wildcard DNS Setup — enable tenant subdomains
- Web Installer Walkthrough — run the installer