I'm having trouble getting the sub pages of a CMS working on a Centos virtual machine. In a web browser, if I go to localhost I see “Apache 2 Test Page powered by CentOS”. If I go to localhost/index.php then I see my joomla's website home page. If I click on a menu like localhost/contact then I get what looks like an apache page not found. It says
“Not Found The requested URL /contact was not found on this server. Apache/2.2.15 (CentOS) Server at localhost Port 80”
I assume I have apache configured wrong. All the tutorials I've found just shows this working so I'm not sure what is wrong.
I'm only using this for testing so I'm only interested in viewing the website via the localhost
I installed apache and mySql via yum. I wanted a specific php version so I installed it from source.
I created with the contents:
<|?
phpinfo();
?|>
and it worked as expected. Note: added | so code would show up.
I installed Joomla at /var/www/html. I used a backup utility to install the software and fill the db with a website.
Here is an overview of what I'm doing to setup the machine Centos 6.3 machine.
yum install mysql-server mysql php-mysql
yum groupinstall 'Development Tools' -y
yum install httpd mysql-server httpd-devel libxml2-devel libcurl-devel libjpeg-devel libpng-devel gmp-devel mysql-devel libtool-ltdl-devel -y
wget http://museum.php.net/php5/php-5.3.6.tar.gz
tar -zxvf php-5.3.6.tar.gz
cd php-5.3.6
'./configure' '--with-mysqli' '--with-mysql' '--enable-bcmath' '--enable-mbstring' '--with-gmp' '--with-curl' '--with-gd' '--with-freetype' '--with-apxs2=/usr/sbin/apxs' '--with-zlib' '--with-jpeg-dir' '--with-png-dir' '--with-gif-dir'
make
make test
make install
chcon -t textrel_shlib_t '/usr/lib/httpd/modules/libphp5.so'
echo 0 >/selinux/enforce
in /etc/httpd/conf/httpd.conf add at bottom:
<IfModule mod_php5.c>
AddType application/x-httpd-php .php .phtml .php3 .php5
AddType application/x-httpd-php-source .phps
php_admin_flag register_globals off
</IfModule>