Does bitnami wordpress stack allow multiple wordpress installs - wordpress

I am currently using the bitnami wordpress stack, I have a website I'm working on but I also want to start another but I don't want to use multisite because I don't want them to share a database.
so is it possible to install another WordPress on bitnami? if yes how do i go about it?

Bitnami Engineer here,
You can deploy another application on top of a running Bitnami instance by following these steps. They assume that your application will live in the /opt/bitnami/apps/myapp/ directory:
Run the following commands to create the directories and assign the necessary permissions:
sudo mkdir /opt/bitnami/apps/myapp
sudo mkdir /opt/bitnami/apps/myapp/htdocs/
sudo mkdir /opt/bitnami/apps/myapp/conf
sudo chown -R bitnami:daemon /opt/bitnami/apps/myapp/htdocs/
sudo chmod -R g+w /opt/bitnami/apps/myapp/htdocs/
Create and edit the /opt/bitnami/apps/myapp/conf/httpd-prefix.conf file and add the line below to it:
Alias /myapp/ "/opt/bitnami/apps/myapp/htdocs/"
Alias /myapp "/opt/bitnami/apps/myapp/htdocs/"
Include "/opt/bitnami/apps/myapp/conf/httpd-app.conf"
Create and edit the /opt/bitnami/apps/myapp/conf/httpd-app.conf file and add the content below to it. This is the main configuration file for your application, so modify it further depending on your application’s requirements.
<Directory /opt/bitnami/apps/myapp/htdocs/>
Options +FollowSymLinks
AllowOverride None
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
</Directory>
NOTE: If your application uses .htaccess files, you should change the AllowOverride None option to AllowOverride All. Find out how to move the .htaccess file content to the main server configuration file.
Once you have created the files and directories above, add the following line to the end of the main Apache configuration file at /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf, as shown below:
Include "/opt/bitnami/apps/myapp/conf/httpd-prefix.conf"
Restart the Apache server:
sudo /opt/bitnami/ctlscript.sh restart apache
You should now be able to access the application at http://SERVER-IP/myapp.
Note: As WordPress requires a database, you will need to create a new database in the server
You can find more information about how to deploy a custom application in this guide of our documentation
https://docs.bitnami.com/general/apps/wordpress/administration/create-custom-application-php/
Thanks

Related

Apache2 not pointing to the WordPress directory

First I followed this tutorial:
https://www.tecmint.com/install-wordpress-alongside-lamp-on-debian-10/
Which worked fine until I got to the step where I needed to set the permissions. After that, when I try to cd wordpress I get Permission Denied, so I had to sudo su to continue following the directions.
Then in step 6 where you set the DocumentRoot, I followed that to the latter.
Now on step 7, where you actually test if you can access the WordPress initial installation screens, Apache2 is still displaying the Default apache2 static page.
I found this tutorial as well:
https://dade2.net/how-to-install-lamp-wordpress-ubuntu-and-debian/
While that second one is more recent, the only difference is that it uses slightly different Permissions and uses MariaDB. So I tried their Permissions and can now cd into wordpress without sudo su.
But the apache2 static page is still there.
Has something changed with Apache2 or WordPress that's preventing it from pointing to WP?
Looks like your are trying to install apache2 with WordPress. I would suggest you to follow these steps and let me know, if it helps.
$ sudo apt-get update
Install apache
$ sudo apt install apache2
Verify your Apache installation by typing "http://your-ip-address" in your favourite browser.
hostname -I | awk '{print $1}' # can help you to get your IP address.
If you have firewall installed run this command to enable port 80. If you don't have firewall, skip this step.
$ sudo ufw allow 'Apache'
Install wordpress
1. sudo apt update
2. sudo apt install wordpress php libapache2-mod-php mysql-server php-mysql
3. cd /etc/apache2/sites-available/
4. sudo vi wordpress.conf
#Add these lines in wordpress.conf
Alias /blog /usr/share/wordpress
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>
<Directory /usr/share/wordpress/wp-content>
Options FollowSymLinks
Order allow,deny
Allow from all
</Directory>
5. sudo a2ensite wordpress
6. sudo a2enmod rewrite
7. sudo service apache2 reload
Now Configure mysql
$ sudo mysql -u root
Once you get mysql prompt, Run create, grant, Flush and quit command as follows -
$ mysql> CREATE DATABASE wordpress;
set username and password
$ mysql> create user 'wordpress'#'localhost' IDENTIFIED BY 'test1234';
Run these commands
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON wordpress.* TO 'wordpress'#'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit
Now, configure "/etc/wordpress/config-localhost.php file to link MySQL DB "WordPress" created above. create the config-localhost.php, if doesn't exist.
add these lines
<?php
define('DB_NAME', 'wordpress');
define('DB_USER', 'wordpress');
define('DB_PASSWORD', 'test1234');
define('DB_HOST', 'localhost');
define('DB_COLLATE', 'utf8_general_ci');
define('WP_CONTENT_DIR', '/usr/share/wordpress/wp-content');
?>
Restart mysql service
$ sudo service mysql start
Login to your WordPress by opening "localhost/blog/wp-login.php".
I found this link, may be helpful for you. It shows each step screenshot also.

Running XAMPP on Mac with other user not working

I'm currently having a problem with XAMPP and WordPress on my Mac. I've downloaded the latest XAMPP version and installed it on my Mac.
After moving WordPress into the htdocs folder, I've got an error in the Dashboard because of missing write permissions.
After searching for some minutes, I've tried to give everyone access to the htdocs folder via the Finder. But that don't helped. So I've tried this here:
https://www.zigpress.com/2018/03/19/resolving-permissions-issues-in-xampp-on-mac-high-sierra/
So I've entered my local Mac user name (johnnymarten, found out via whoami) and the group staff. The problem is, that the Apache Server don't starts anymore now and I'm getting this error message here:
INFO: Starting "apache"
ERROR: Failed to start "apache": cannot start
service: AH00543: httpd: bad user name johnnymarten
I'm coming from Windows and I don't get this done. I'm at lease done with this. Do you have any idea what I can do?
Xampp runs as root. Reset file permissions to get it to start.
1) reset directory: sudo chown -R root:admin /Applications/XAMPP
2) on my Xampp 2 directories are different:
sudo chown -R daemon:daemon /Applications/XAMPP/xamppfiles/logs
sudo chown -R daemon:daemon /Applications/XAMPP/xamppfiles/temp
3) Make a new directory for WordPress and let everyone use it.
mkdir new_dir
chmod 777 new_dir
4) Add directory to httpd.conf
<Directory "/new_dir">
Options ExecCGI FollowSymLinks
AllowOverride All
Require all granted
RewriteEngine On
RewriteBase /
</Directory>
Load WP in /new_dir
Restart Apache.

How to give bitnami user edit permission on .htaccess for bitnami multisite ec2?

I have installed a Bitnami Multisite Wordpress AMI on my Amazon EC2 instance. to setup the Multiite Network I need to make changes in the .htaccess file.
I checked the permission on the file :
-rw-r--r-- 1 daemon daemon 235 Nov 29 12:15 .htaccess
I need the bitnami user to be able to edit the file. So first I did
getfacl .htaccess
# file: .htaccess
# owner: daemon
# group: daemon
user::rw-
group::r--
other::r--
I am logged in as bitnami user. So i used the command as below to give bitnami edit permissions.
sudo setfacl –m u:bitnami:rwx .htaccess
But I get the error as
Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ...
Try `setfacl --help' for more information.
Need help to resolve the same.
Thanks
Bitnami Engineer here.
You can change the permissions of the .htaccess file by running this command
sudo chown bitnami:daemon .htaccess
sudo chmod g+w .htaccess
After running those commands, you can start to edit the file.
For security and performance reasons, we do not allow Apache to read the .htaccess files. For this reason, we moved the configuration in the .htaccess files to the main application configuration files and set the AllowOverride option to None by default.
You have two different options to start using .htaccess files:
- Edit the /opt/bitnami/apps/mediawiki/conf/htaccess.conf file and include the information of the .htaccess file inside a Directory block. You will find more information about this in this guide
https://docs.bitnami.com/aws/apps/wordpress-multisite/administration/use-htaccess/
Edit the /opt/bitnami/apps/wordpress/conf/httpd-app.conf file and change the AllowOverride option to All. After that, you will need to restart Apache
In both options, you will need to restart Apache after that:
sudo /opt/bitnami/ctlscript.sh restart apache

Unpacking the package… Could not create directory. Wordpress, Apache2, Ubuntu

This question could be all around but I have tried most answers and permission 777. But, still no luck.
/etc/apache2/sites-available/mysite.conf
<VirtualHost *:80>
ServerName www.mysite.com
ServerAdmin mymail#mail.com
DocumentRoot /var/www/html/wordpress
ErrorLog ${APACHE_LOG_DIR}/mysite_error.log
CustomLog ${APACHE_LOG_DIR}/mysite.log combined
</VirtualHost>
/etc/vsftpd.conf
listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
allow_writeable_chroot=YES
I set permission 777 to /usr/share/wordpress and /var/lib/wordpress.
The update creates a directory in wp-content/update inside the site directory. Linux does not set permissions automatically of child directories to those of the parent. Therefore wp-content/upload will not necessarily have 777 permissions.
Try change permissions of wp-content/update to 777. If this works it means that the owner of the WordPress folders is not the the user trying to update the site.
What worked for me was to add my ftp client to the group that the owner of the WordPress process. (How do I know which linux user Wordpress uses for plugin installation) to find the owner. and then set all directories to 775 permissions and files to 665 in the site directory.
chmod 775 $(find -type d)
chmod 665 $(find -type f)
You need to give write permissions to the relevant directories. Ideally, you should do it only for the relevant file or folder and then revert the permissions back so as to not leave your site vulnerable.
You can fix this using the following commands from the command line (assuming that you are in the WordPress root folder):
# cd wp-content
# chmod -R a+w plugins
# chmod -R a+w themes
# chmod -R a+w upgrade
The safest solution is to add Apache to the same group as the owner of the WordPress installation and change all group permissions to writeable.
A more detailed solution can be found at: http://techzog.com/wordpress/fixing-unpacking-package-could-not-create-directory-error-wordpress/

Wordpress Could not copy file. /var/www/wp-content/upgrade/attitude.tmp/attitude/images/my-space#2x.png

This problem occurs when I try to install any themes inside my wordpress admin console.
I have tried change the owner of the /var/www directories (with chown -R <username> /var/www) I have also setup permission 755 for the directory. I realize the problem is due to the file's permission in the upgrade directory. The file has permission -rw-r--r-- (this directory and files inside are supposed to be created by the FTP user I supplied when installing the theme)
Do you have selinux installed?
You can check by going to the ssh window and type # sestatus
It should show you
SELinux status: enabled/disabled
SeLinuxfs mount: /selinux
Current mode: enforce/permissive
Mode from config file: enforce
Policy Version: XX
Policy from config file: targeted
if it's on 'enforce', you can temporarily change it to permissive to see if that's your issue but using
# setenforce 0
# getenforce // Should return permissive
Try to upload then. If it works you need to add that directory to tell selinux to allow httpd to write there.
chcon -R -t httpd_sys_rw_content_t DIRECTORY/PATH/THAT/YOU/WANT/TO/WRITE/TO/
Hope this helps

Resources