1

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.

  • Check the apache logs, then check the php/cms logs. – Captain Giraffe Dec 27 '14 at 20:38
  • Uhm, just by cat-ing them? Which files exactly? I'm quite new to web-admin stuff (as I am sure you have fathomed). – qubex Dec 27 '14 at 20:39
  • root@lamp files/armadillo# tail -100 /var/log/apache2/access.log root@lamp files/armadillo# Empty httpd logs. But it works. Maybe I don't have logging enabled or something like that? – qubex Dec 27 '14 at 20:43
  • Ah, error.log contains many entries of the rough form [Sat Dec 27 20:42:30 2014] [error] [client 192.168.111.21] PHP Warning: Unknown: open(/var/taleoftwotowns/files/armadillo/.tmp/sess_ev1b0qajjrh965b9qnbhsfho04, O_RDWR) failed: No such file o r directory (2) in Unknown on line 0, referer: http://www.taleoftwotowns.com/ Might this be because I haven't correctly set up VirtualHosts or some sort of DNS mishap? – qubex Dec 27 '14 at 20:46
  • 1
    @qubex, copy-paste it to terminal tail -f /var/log/apache2/error.log. After, just access to your webpage from web-browser. Please show result, which will be displayed in Terminal. Sometimes this problem can be resolved by installing php5-mysql – Vitalii Dec 29 '14 at 15:37
0

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
  • Did this help you? – geoffmcc Dec 28 '14 at 19:40
0

try this,

sudo a2enmod rewrite

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.