apache2 works just fine, and I have access to .html files from public_html folder, but when I try to open http://127.0.0.1/~*kon *in a browser, when public_html contins only index.php file, I get something like this:
You should make sure you’ve installed and enabled PHP properly - make sure the PHP module for apache is installed: apache2-mod_php5 or apache2-mod_php7 depending on what you need.
Then make sure Apache is loading the module; sudo a2enmod php5 or sudo a2enmod php7 once again depending on what PHP you are using.
Make sure Apache2 is restarted; sudo systemctl restart apache2
No further editing should be needed and index.php should be parsed in the users home directory as expected.
To my eye…
The SDB you’re following is so far out of date that a lot of what is in it is likely questionable…
Aside from the init commands instead of sytemd… and only regarding the Apache and PHP parts (I didn’t look at the MySQL part)
I wasn’t aware that Apache supports a website at that specified location by default (it should be /srv/www/htdocs/). In any case you should configure your Apache webserver to support websites using the YaST apache web server configuration module. Install it using the following command (or use YaST Software Manager)
zypper in yast2-html-server
Unlike the instructions in the SDB you reference, I create a phpinfo.php page with the php code, then access the page with
But,
After a test I just ran on a 42.2 machine, it looks like the PHP installation is broken, Apache does not seem to recognize the php code on my machine and offers to download the file instead of executing. Didn’t look into this further for now (no time immediately, maybe someone else can pick up this thread).