OS Linux Mint onto VirtualBox

I've installed PHP like in this manual, https://community.linuxmint.com/tutorial/view/486

When I am trying to test PHP and go to http://localhost/testphp.php it gives me this, "The requested URL /testphp.php was not found on this server." But I have it,

danko-VirtualBox www # pwd
danko-VirtualBox www # ls
html  testphp.php
danko-VirtualBox www # cat < testphp.php
<?php phpinfo(); ?>

and apache is working.

Some previous steps

danko-VirtualBox danko # killall nginx
danko-VirtualBox danko # netstat -punta | grep LISTEN
tcp        0      0   *               LISTEN      597/smbd        
tcp        0      0  *               LISTEN      1246/dnsmasq    
tcp        0      0 *               LISTEN      1835/cupsd      
tcp        0      0   *               LISTEN      597/smbd        
tcp6       0      0 :::139                  :::*                    LISTEN      597/smbd        
tcp6       0      0 ::1:631                 :::*                    LISTEN      1835/cupsd      
tcp6       0      0 :::445                  :::*                    LISTEN      597/smbd     

 danko-VirtualBox danko # sudo apt-get install php5 libapache2-mod-php5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libapache2-mod-php5 is already the newest version.
php5 is already the newest version.
The following packages were automatically installed and are no longer required:
  kate-data katepart kde-runtime kde-runtime-data kdegames-card-data
  kdelibs-bin kdelibs5-data kdelibs5-plugins kdoctools
  language-selector-common libattica0.4 libdlrestrictions1 libgcrypt20
  libkactivities6 libkatepartinterfaces4 libkcmutils4 libkde3support4
  libkdeclarative5 libkdecore5 libkdegames6abi1 libkdesu5 libkdeui5
  libkdewebkit5 libkdnssd4 libkemoticons4 libkfile4 libkhtml5 libkio5
  libkjsapi4 libkjsembed4 libkmediaplayer4 libknewstuff3-4 libknotifyconfig4
  libkntlm4 libkparts4 libkpty4 libkrosscore4 libktexteditor4 libkubuntu0
  libkxmlrpcclient4 libntrack-qt4-1 libntrack0 libphonon4 libplasma3
  libpolkit-qt-1-1 libqapt2 libqapt2-runtime libqca2 libqt4-qt3support
  libqtmultimediakit1 libsolid4 libssh-4 libstreamanalyzer0 libstreams0
  libthreadweaver4 libutempter0 ntrack-module-libnl-0 oxygen-icon-theme phonon
  phonon-backend-gstreamer phonon-backend-gstreamer-common
  phonon-backend-gstreamer1.0 plasma-scriptengine-javascript
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 315 not upgraded.

 danko-VirtualBox danko # sudo /etc/init.d/apache2 restart
 Restarting web server apache2                                                AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 
Set the 'ServerName' directive globally to suppress this message
                                                                         [ OK ]
  • what happens when you put "testphp.php" in "/var/www/html/" – Yorik Jun 16 '16 at 17:16

It started to work after I reinstalled PHP with command:

sudo apt-get install php5-cli

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.