TransWikia.com

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?

Thanks.

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.pl index.xhtml index.htm
 </IfModule>

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!

Ask a Question

Get help from others!

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