Answer the question
In order to leave comments, you need to log in
Why is php not working on web server in Ubuntu?
Today I set up a web-server and cloned the repository. All code is in place. But it doesn't show up, here is my site config:
ServerName play.leo.com
AddType application/x-httpd-php .php .phtml
AddDefaultCharset UTF-8
ServerAlias www.play.leo.com
DocumentRoot /var/www/play
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow
from all
Answer the question
In order to leave comments, you need to log in
I suspect that the problem is moving from Apache 2.2- to 2.4 +
httpd.apache.org/docs/2.4/upgrading.html
If everything is set up correctly, it should be enough to replace:
Order allow,deny
Allow from all
Require all denied
1. Is the host listed in /etc/hosts?
2. Is the web server enabled?
3. If scripts start with "<?" - is their support enabled in php.ini (short_open_tag) ?
4. What does the web server write in the logs?
5. If the web server is apache2.4 - see Andrey Bezpalov
's answer
6. "Doesn't work" - a bad definition, use a more accurate one, maybe there is no access to the database / cache server, there are also some nuances here.
7. Perhaps the php version is too old, or the libraries / pecl extensions / pear extensions are not installed.
8. If composer is used, check if dependencies are loaded.
This is the most basic stack of directions as to why it might not work, for more precise answers - be specific with the question.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question