English Español
⚠️

Document Root Configuration Required

Your web server is not pointing to the correct directory

🔒 Security Risk Detected

Your web server's document root is pointing to the project root directory instead of the public/ folder. This exposes sensitive files like .env, configuration files, and source code to the internet.

🚨 What's Exposed Right Now:

🔧 How to Fix

Apache (.htaccess)

Edit your Apache configuration or virtual host file:

# Apache VirtualHost Configuration <VirtualHost *:80> ServerName yourdomain.com DocumentRoot /var/www/html/musedock/public <Directory /var/www/html/musedock/public> Options -Indexes +FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost>

Then restart Apache: sudo systemctl restart apache2

Nginx

Edit your Nginx server block configuration:

# Nginx Server Block server { listen 80; server_name yourdomain.com; root /var/www/html/musedock/public; index index.php index.html; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { fastcgi_pass unix:/var/run/php/php8.0-fpm.sock; fastcgi_index index.php; include fastcgi_params; } }

Then restart Nginx: sudo systemctl restart nginx

cPanel / Shared Hosting

In your hosting control panel:

  1. Go to "Addon Domains" or "Domains"
  2. Set document root to: public_html/musedock/public
  3. Or create a subdomain pointing to the public folder
  4. Alternatively, move all files from public/ to public_html/ and move core/, config/, etc. one level up

📝 Alternative: Move Files (Not Recommended)

If you cannot change document root, you can restructure the files (but this is less secure):

# Move public contents to root mv public/* ./ mv public/.htaccess ./ # Move sensitive directories outside web root (if possible) mv core/ ../core/ mv config/ ../config/ mv storage/ ../storage/ # Update paths in index.php accordingly