Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shaher11's avatar

Deployment on shared host Issus!

I am trying to deploy laravel API backend project and vue.js frontend project "separate projects" the project work locally without any problems but when put the projects on the shared host it doesn't work.

Error 500

https://project-domain-name.net/api/v1/login    500 (Internal Server Error)     
chunk-vendors.0888025d.js:473 

This is .htaccess file

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^(public)
    RewriteRule ^(.*)$ public/ [L]
    AddType application/x-httpd-ea-php71 .php .php7 .phtml
</IfModule>

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php7_module>
   php_flag display_errors Off
   php_value max_execution_time 1000
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 1024M
   php_value post_max_size 100M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php71"
   php_value upload_max_filesize 100M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php71” package as the default “PHP” programming language.
<IfModule mime_module>
  AddType application/x-httpd-ea-php71 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

Vue.js .env file

VUE_APP_BASE_URL=https://project-domain-name.net/api/v1/
VUE_APP_I18N_FALLBACK_LOCALE=https://project-domain-name.netapi/v1/
VUE_APP_WEBSOCKETS_KEY=local
VUE_APP_WEBSOCKETS_SERVER=
0 likes
6 replies
bugsysha's avatar

It was never meant to work on shared hosting. Find cheap VPS and place it there if possible.

bugsysha's avatar

@shaher11 and it will always be like that. At least you can check storage/logs/laravel.log to see why you are getting that 500 error.

martinbean's avatar
Level 80

@shaher11 If you’re getting a 500 error then check your error log. It could be anything.

shaher11's avatar

It gives me this message

@martinbean [Sun Oct 03 13:44:40.878526 2021] [core:alert] [pid 696:tid 47732775380736] [client 41.239.169.54:1025] /home/emsapi/public_html/api/.htaccess: without matching section, referer: https://project-domain-name.net

Please or to participate in this conversation.