Apache & SWAP Permissions

Keywords: WordPress - AWS - Technical issue - Permissions

bndiagnostic ID: 95bb3ee6-3573-856c-b0ae-59e639ca4748

bndiagnostic output:

? Apache: Found possible issues
? Resources: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/

bndiagnostic failure reason: I do not know how to perform the changes explained in the documentation

Description:
Hi Folks,

I’m a self taught beginner developer so please bear with me.

  1. Apache Error - Unable to serve directories

  2. Increase SWAP - I followed the steps on this guide Increase the available memory but I was unable to complete because I am unable to access the files at root to change the permissions via FTP and I am no experience with Terminal.

Error Report Follows.

Thanks,

Justin

[Apache]

Found recent error or warning messages in the Apache error log.

[Sun May 08 20:05:09.244690 2022] [autoindex:error] [pid 22169:tid 
139780608075520] [client **ip_address**:35138] AH01276: Cannot serve directory 
/opt/bitnami/wordpress/wp-includes/sodium_compat/namespaced/: No matching 
DirectoryIndex (index.html,index.html,index.htm,index.php) found, and 
server-generated directory index forbidden by Options directive, referer: 
Press [Enter] to continue:
megphilipauthor.com
 [Sun May 08 20:11:06.640692 2022] [autoindex:error] [pid 22170:tid 
139780641646336] [client **ip_address**:37694] AH01276: Cannot serve directory 
/opt/bitnami/wordpress/wp-content/uploads/2022/: No matching DirectoryIndex 
(index.html,index.html,index.htm,index.php) found, and server-generated 
directory index forbidden by Options directive, referer: megphilipauthor.com
 [Mon May 09 13:25:48.312913 2022] [autoindex:error] [pid 1810:tid 
139780767536896] [client **ip_address**:50457] AH01276: Cannot serve directory 
/opt/bitnami/wordpress/wp-admin/css/: No matching DirectoryIndex 
(index.html,index.html,index.htm,index.php) found, and server-generated 
directory index forbidden by Options directive, referer: binance.com

Please check the following guide to troubleshoot server issues:

https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-erro
rs-apache/

[Resources]

Your instance has little available RAM memory.

 total used free shared buff/cache available Mem: 987 548 109 106 328 176 Swap: 
Press [Enter] to continue:
634 91 542

You could try to increase your instance’s memory. Please check your cloud
provider’s documentation for more information.

===== End of bndiagnostic tool output =====

Press [Enter] to continue:
The diagnostic bundle was uploaded successfully to the Bitnami servers. Please copy the following code:

95bb3ee6-3573-856c-b0ae-59e639ca4748

And paste it in your Bitnami Support ticket.
bitnami@ip-172-26-8-217:~$

Support ticket.
bitnami@ip-172-26-8-217:~$
bitnami@ip-172-26-8-217:~$ free -m
total used free shared buff/cache available
Mem: 987 349 403 79 234 416
Swap: 634 140 494
bitnami@ip-172-26-8-217:~$ sudo dd if=/dev/zero of=/mnt/swap.0 bs=1024 count=1048576
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 16.0122 s, 67.1 MB/s
bitnami@ip-172-26-8-217:~$ sudo mkswap /mnt/swap.0
mkswap: /mnt/swap.0: insecure permissions 0644, 0600 suggested.
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
no label, UUID=84f5de50-adb1-467a-9f4e-0a50abee91ac
bitnami@ip-172-26-8-217:~$ sudo su
root@ip-172-26-8-217:/home/bitnami# echo “/mnt/swap.0 swap swap defaults 0 0” >> /etc/fstab
root@ip-172-26-8-217:/home/bitnami# swapon /mnt/swap.0
swapon: /mnt/swap.0: insecure permissions 0644, 0600 suggested.
root@ip-172-26-8-217:/home/bitnami#

Hi @partycaribbean,

Increasing the swap memory will only get you so far. It might help a bit but I recommend upgrading the instance to one with more resources:

https://docs.bitnami.com/aws/faq/administration/change-server-type/

Regards,
Michiel

Hi Michiel,

The image is the current instance. Which AWS Lightsail instance would you suggest?

Thanks,

Justin

Hi @partycaribbean,

I would try the next one, so 2GB RAM 1vCPU.

Regards,
Michiel