Page 1 of 1
Setup an Apache2 Web Server with Bionic
Posted: Mon Aug 03, 2020 9:03 pm
by rockedge
These are the rough steps of getting an Apache2 web server running in
Puppy Linux Bionic32 or Bionic64. These steps will work in every Puppy from Lucid 5.2.8 upwards.
load devx for Bionic
load 32 bit compat lib if Bionic64
in a terminal :
these are the packages installed with the PPM
apache2_2.4.29
apache2-bin_2.4.29
apache2-data_2.4.29
apache2-utils_2.4.29
libaprutil1-dbd-sqlite3_1.6.1-2
libaprutil1-ldap_1.6.1-2
mime-support_3.60ubuntu1
Configuration files for apache2 are here:
/etc/apache2
The configuration files for the apache2 server need to be sym-linked or modified
to run correctly. As one becomes more familiar with the system there are many tweaks.
I find that it is easier to use ROX and open /etc/apache2 and symlink manually the .ini files from
/etc/apache2/mods-available to
/etc/apache2/mods-enabled and then sym-link the .conf files
from
/etc/apache2/conf-available to
/etc/apache2/sites-available
open
/etc/apache2/apache2.conf and find :
ServerRoot "/etc/apache2"
below it add :
ServerName localhost
or which ever specific domain name is appropriate.
These are some of the controls:
Using apache2ctl is the most reliable way of start|stop|restart|status the apache2 web server running in Bionic32 or Bionic64.
There are more which can be referenced in the Apache documentation. Apache runs well in Puppy Linux but needs systemd for using the service commands as in Ubuntu. So without tracking down the differences to get those to work, using apache2ctl is the reliable way to go.
the web server root is
/var/www/html
start the web server :
open a browser and open
http//localhost/
Next step is installing the PHP.
Re: Setup an Apache2 Web Server with Bionic
Posted: Wed Aug 05, 2020 11:00 am
by mohittomar13
Thanks for the post. Please also upload the steps for PHP and mySQL. I think that this post should be closed for new replies and must serve as a guide/manual rather than a Q/A post (Normal Forum Thread). Or a new Section must be created on the Forum which serves as the central place for comman puppy HowTo. I hope you understand what I mean. You may also delete this post of mine and tag your post at the top in the new Section (If you create a new Section). Thanks
Re: Setup an Apache2 Web Server with Bionic
Posted: Wed Aug 05, 2020 12:01 pm
by mohittomar13
I followed your instructions and tried to restart the server after adding the required lines in the apache2.cfg. After running the command to restart the server this is what I got.
Code: Select all
root@puppyPC5832:~# apache2ctl restart
AH00534: apache2: Configuration error: No MPM loaded.
Action 'restart' failed.
The Apache error log may have more information.
Re: Setup an Apache2 Web Server with Bionic
Posted: Wed Aug 05, 2020 3:10 pm
by rockedge
once we have a good set of instructions we can consider locking the topic but for now we will keep improving them here!
open /etc/apache2/mods-enabled and look for the sym-links
/etc/apache2/mods-enabled/mpm_prefork.conf and
/etc/apache2/mods-enabled/mpm_prefork.load that these 2 exist.
try in a terminal:
make sure there is only mpm_prefork. If there is a mpm_event.conf and / or mpm_event.load delete both.
There can only be one form of mpm enabled. There could be one of these three:
mpm_prefork (this is the one needed for php-cgi)
mpm_event
mpm_worker
more will be included on using php-fpm for multi-thread operation of PHP which will use one of the other mpm modules.
also possible to use in a terminal:
Code: Select all
a2dismod mpm_event
a2enmod mpm_prefork
apache2ctl restart
Re: Setup an Apache2 Web Server with Bionic
Posted: Thu Aug 13, 2020 8:12 pm
by mohittomar13
Hi.. I found this link and XAMPP is working at 1000% speed
http://wikka.puppylinux.com/XAMPP
This serves my purpose.
For downloading the .sfs follow the link below.
https://code.google.com/archive/p/xampp-puppy/downloads
Re: Setup an Apache2 Web Server with Bionic
Posted: Fri Aug 14, 2020 6:47 pm
by rockedge
Re: Setup an Apache2 Web Server with Bionic
Posted: Tue Jan 12, 2021 10:52 am
by CasparPup
This is a package from 2013. From my point of view it's too old.
Re: Setup an Apache2 Web Server with Bionic
Posted: Tue Jan 12, 2021 2:06 pm
by rockedge
Might be the best bet to install Apache2, mariaDB (mysql) and PHP7 directly. This will be more like a setup one would encounter commercially.
Re: Setup an Apache2 Web Server with Bionic
Posted: Mon Mar 29, 2021 5:44 pm
by gabtech
How do I enable apache to autostart at boot?
Re: Setup an Apache2 Web Server with Bionic
Posted: Mon Mar 29, 2021 5:59 pm
by rockedge
you can do this by enabling the service. Method #1 is use the Puppy Setup and access the services and check the enable box. Usually is automatically done but double check it.
Method #2 on the command line (or something like this command)
- Screenshot(74).png (40.89 KiB) Viewed 3525 times
Re: Setup an Apache2 Web Server with Bionic
Posted: Mon Mar 29, 2021 7:37 pm
by gabtech
@rockedge
Thanks for the above solution.
Another problem here - I'm trying to configure maridb but I get the error msg in the screenshot attached below.
Re: Setup an Apache2 Web Server with Bionic
Posted: Mon Mar 29, 2021 9:19 pm
by rockedge
Have you initialized the mysql server and then ran /mysql_secure_installation?
The error indicates that either the directory /var/run/mysqld does not exist and/or the mysql server is not running (mysqld)
So try in a terminal
and report what happens please.
Re: Setup an Apache2 Web Server with Bionic
Posted: Tue Mar 30, 2021 9:15 am
by gabtech
This is the error I'm getting.
Re: Setup an Apache2 Web Server with Bionic
Posted: Tue Mar 30, 2021 12:39 pm
by rockedge
Syntax Error!
the command should be: (check the spelling)
Code: Select all
mysqld -u root &
or
mysqld -uroot &
If it complains about using the user "mysql", try to add one with:
if there is an error doing that we will need to do some extra steps.
So looking at the screenshot the last command was typed in wrong!
Re: Setup an Apache2 Web Server with Bionic
Posted: Tue Mar 30, 2021 1:10 pm
by gabtech
@rockedge
HI and thanks. Still getting errors.
Re: Setup an Apache2 Web Server with Bionic
Posted: Tue Mar 30, 2021 1:51 pm
by rockedge
did you initialize the mysql server?
Change the owner of /var/log/mysql so it matches the server user. But first do the above then set your root password for mysql
Re: Setup an Apache2 Web Server with Bionic
Posted: Wed Mar 31, 2021 3:46 pm
by gabtech
@rockedge
Thanks man for the help. I now need to install zoneminder, is the inform you outlined here - http://oldforum.puppylinux.com/puppy/vi ... p?t=101999 workable in fossa.
Re: Setup an Apache2 Web Server with Bionic
Posted: Wed Mar 31, 2021 6:31 pm
by rockedge
This script that will install ZM. Open it up and use the parts you need from the point you are now. Which I assume you have the web server and mysql server running with PHP 7.2+
Remove the fake "gz" from the filename and make executable to run it if you want to.
Re: Setup an Apache2 Web Server with Bionic
Posted: Thu Apr 01, 2021 7:59 am
by gabtech
@rockedge
Thanks for script.