Webserver not displaying PHP page

Ask Ubuntu Asked by qubex on January 3, 2022

I have provisioned an apache webserver with a custom user for content management, created a http-docs root directory in /var/, and assigned ownership to the user with the usual chown stuff, yada yada yada, and basically the basic stuff works.

I’ve uploaded some content and it displays when accessing via HTTP & HTTPS.

What totally confuses me is that the PHP pages for managing my CMS do not display, whereas a web-shell does.

In case it is relevant I am using the Armadillo CMS that is available as a RapidWeaver plugin. It depends on Apache, PHP, and MySQL and all these requirements are (apparently) met. Furthermore I can exclude MySQL as being at fault since I need to access the admin/setup page in order to provision the system, and insofar as it keeps turning up blank, I have not been able to even attempt to configure it.

While inspecting the relevant .php file from within the server’s filesystem the file is populated with valid PHP code.

What am I doing wrong? What have I forgotten to do?


2 Answers

try this,

sudo a2enmod rewrite

Answered by bimal on January 3, 2022

I assume when you installed php you used something like

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt

Did you remember to modify Apache so it looks for .php before .html?

 sudo nano /etc/apache2/mods-enabled/dir.conf

It should look something like this:

 <IfModule mod_dir.c>
 DirectoryIndex index.php index.html index.cgi index.xhtml index.htm

Note that index.php should be the first.

Once change has been made you just need to restart the server

 sudo service apache2 restart

Answered by geoffmcc on January 3, 2022

Add your own answers!

Related Questions

Install Ubuntu Server 20 on NVMe M.2 Dell Precision T5610

0  Asked on December 3, 2021 by dale-nelson


Nginx 502 Bad Gateway Ubuntu 20.04, php 7.4

0  Asked on December 3, 2021


How do you find libraries (C++) in Ubuntu?

2  Asked on December 1, 2021 by bora-george


Upgrade to 20.04 from 18.04 GRUB menu hidden

2  Asked on December 1, 2021 by mesvre


Ubuntu 20.04 Automatic Login Not Working Consistently

2  Asked on December 1, 2021 by bob-reed


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP