cancel
Showing results for 
Search instead for 
Did you mean: 

installing magento on ubuntu error 500 Internal Server Error

SOLVED

installing magento on ubuntu error 500 Internal Server Error

Hello. 

Trying to install magento 2.2.1 on Ubuntu Linux vps. I had to reinstall OS from centos to ubuntu.

I have installed apache2, mysq, php7 and they seem to be working. added info.php to 

var/www/html.. and page loads fine and shows all the php info. 

created a Vhost for new domain and changed RootDirectory to /var/www/USER/public_html

added a test html page and using my domain , i can access it fine.

Added user to sudoer and www-data and changed file folder ownership to USER www-data

however, no php file gets executed. i get 500 internal server error. 

in apache2.conf i change AllowOverride from none to All , doing that i get the same error as mentioned above for my files, reverting back to none , html files work 

is there a step im missing ?

do i need to add something in my magento root directory ? 

any suggestion would be greatly appreciated 

4 REPLIES

Re: installing magento on ubuntu error 500 Internal Server Error

Hi @tonysar,

 

CAn you check on your webserver error log which message you got by the error 500?

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: installing magento on ubuntu error 500 Internal Server Error

Thank you for reply. @Damian Culotta

I don't know which log file i need to access. but interesting is that , if i change DocumentRoot back to original /var/www/html 

i can load my info.php file that i put there during php installation . .so this means my php dose work indeed.. 

i think in order to use /var/www/USER/public_htlm i need to do something with php.ini ??

Thanks

Re: installing magento on ubuntu error 500 Internal Server Error

Additionl info.

in apache2.conf document root set to /var/www

looking at php.info Apache Environment section

Documentroot points to /var/www/html

im not sure if this helps. 

Re: installing magento on ubuntu error 500 Internal Server Error

Ok go things working now. 

I did manage to setup /var/www/USER/public_html

i missed a stet in enabling Vhost for new domain by using 

a2ensite domain.com.conf

this command enables the vhost for the domain. and now php is working. 

Thanks.