Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
3092 views
500 error on index.php with nginx + php-fpm
Before starting, I'd like to ssay this is my first experience with `VPS`, I have an Ubuntu 18.04 64bit minimal server. > For everything I tried so far I didn't tried using complex application. Just plain html file with `Hello` message and WordPress blank installation. To begin with, I'm installing `...
Before starting, I'd like to ssay this is my first experience with VPS, I have an Ubuntu 18.04 64bit minimal server. > For everything I tried so far I didn't tried using complex application. Just plain html file with Hello message and WordPress blank installation. To begin with, I'm installing Vesta Panel because it's easier for me to control some basic tasks and configurations. In order to install this panel, I'm using nginx + php-ftpm. After I install WordPress with this configuration I'm getting 500 error with this message: 2020/06/23 23:09:09 [error] 12335#12335: *11 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: example.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "example.com" This error only appears when I try to access the WordPress index page, or any file with the naem index.php, if it's an index.html file it loads properly. --- After that I restored the VPS and installed Vesta Panel using nginx + apache. With this configuration, WordPress is working as expected. When I access my domain example.com the steps to create an WordPress website appears as expected. With both configurations, the folder holding all the websites files is /home/admin/web/{domain.com}/public_html. --- Edit: As requested in the comments, I'm adding more information to the question. systemctl status php-fpm.service returns: php-fpm.service - LSB: starts php7.2-fpm Loaded: loaded (/etc/init.d/php-fpm; generated) Active: active (exited) since Wed 2020-06-24 01:44:40 UTC; 10h ago Docs: man:systemd-sysv-generator(8) Tasks: 0 (limit: 614) CGroup: /system.slice/php-fpm.service Jun 24 01:44:40 agdevision.com.br systemd: Starting LSB: starts php7.2-fpm... Jun 24 01:44:40 agdevision.com.br systemd: Started LSB: starts php7.2-fpm. sudo journalctl -u php-fpm.service returns: -- Logs begin at Fri 2019-03-08 08:44:31 UTC, end at Wed 2020-06-24 12:08:35 UTC. -- Jun 24 01:44:40 agdevision.com.br systemd: Starting LSB: starts php7.2-fpm... Jun 24 01:44:40 agdevision.com.br systemd: Started LSB: starts php7.2-fpm.
celsomtrindade (101 rep)
Jun 24, 2020, 12:46 AM • Last activity: Jul 19, 2025, 02:06 PM
1 votes
4 answers
1753 views
Install memcache for Wordpress on debian with php-fpm
The install instructions for memcache are not really up-to date. How do I install on Debian using php-fpm and nginx? I tried this: apt install memcache zlib1g-dev php-dev pecl install memcache This will install the extension into /usr/lib/php/20220829/memcache.so So I added echo extension = memcache...
The install instructions for memcache are not really up-to date. How do I install on Debian using php-fpm and nginx? I tried this: apt install memcache zlib1g-dev php-dev pecl install memcache This will install the extension into /usr/lib/php/20220829/memcache.so So I added echo extension = memcache.so>>/etc/php/8.1/fpm/php.ini Then restarted service php8.1-fpm restart Now I want to install the "Memcached Object Cache" Wordpress Plugin, but the [plugin-website](https://de.wordpress.org/plugins/memcached/#installation) just sais: > 1. Install memcached on at least one server. Note the connection info. The default is 127.0.0.1:11211. > > 1. Install the PECL memcache extension > > 1. Copy object-cache.php to wp-content > > 1. Add the WP_CACHE_KEY_SALT constant to the wp-config.php: > > define( 'WP_CACHE_KEY_SALT', '...long random string...' ); I cannot find object-cache.php anywhere. --- The problem is, that phpize will use php8.2 to compile the extension. but if I uninstall php8.2, I also uninstall php-dev. If I reinstall it, it will try to install php8.2 again ;( How do I solve this?
rubo77 (30435 rep)
Apr 11, 2023, 01:40 PM • Last activity: Jun 9, 2025, 10:16 AM
0 votes
2 answers
82 views
Troj/PHPShel-CE and PHP/Agent-BJNA trojan
I'm currently dealing with a real threat: the trojans Troj/PHPShel-CE and PHP/Agent-BJNA showed up on my system. I've decided to move to another provider – the first server IP was already blacklisted, and I want to stop any further damage. As a first step, I disabled apache2 and blocked all incoming...
I'm currently dealing with a real threat: the trojans Troj/PHPShel-CE and PHP/Agent-BJNA showed up on my system. I've decided to move to another provider – the first server IP was already blacklisted, and I want to stop any further damage. As a first step, I disabled apache2 and blocked all incoming/outgoing ports except SSH (port 22). I'm now backing up only the important data (like .pdf, images, etc. – no .php, .exe, .com or anything executable). But I'm still confused why Sophos didn’t detect the full extent of the infection. Here's what it found: Severity,When,Event,User,"User Groups",Device,"Device Groups","IP Address" Low,"2025-05-30T22:51:14+02:00","Scan 'Scan Now' completed",n/a,,mail,,xx.xx.xx.xx High,"2025-05-30T22:39:03+02:00","Outbreak detected",n/a,,mail,,xx.xx.xx.xx Medium,"2025-05-30T22:39:02+02:00","Malware detected: 'Troj/PHPShel-CE' at '/var/www/clients/client1/web7/web/wp-includes/l10n/class-wp-translation-file-security.php'",n/a,,mail,,xx.xx.xx.xx Low,"2025-05-30T22:38:45+02:00","Malware cleaned up: 'PHP/Agent-BJNA' at '/var/www/clients/client1/web3/web/wp-content/plugins/wpforms-lite/vendor_prefixed/apimatic/jsonmapper/tests/namespacetest/model/.1748559585'",n/a,,mail,,xx.xx.xx.xx more... about 150 times... After scanning multiple times, some of the same files were detected again – so clearly something is still active. I chatted with Claude (AI assistant), and he suggested checking all user crontabs, using this: echo "Checking crontabs..." for user in $(cut -f1 -d: /etc/passwd); do echo "--- Crontab for $user ---" crontab -u "$user" -l 2>/dev/null || echo "No crontab for $user" done At first, nothing suspicious came up – but then I found something under a user called web10: root@mail:/usr/local/sbin# crontab -u web10 -l * * * * * /usr/bin/php -r 'eval(gzinflate(base64_decode("jVJtj5pAEP7**** LOT MORE ****=="))); ###### My question: When we move to a new (managed) hosting provider, is there a risk that some infected files could sneak into the new system during the migration – even if we’re careful and avoid transferring obvious malware like .php and .exe files? ###### My setup: Ubuntu 24.04.2, apache2, php 8.3/8.4, ispconfig3
Harvey68 (1 rep)
Jun 1, 2025, 09:23 AM • Last activity: Jun 3, 2025, 08:44 AM
0 votes
1 answers
2194 views
When I access my page I have a 403 Forbidden error LiteSpeed Web Server
I'm trying to install Wordpress using OpenLiteSpeed webserver. Wordpress is installed in `/usr/local/lsws/Liveragi/html/{wordpress files}`. When I access the page using HTTP the page has a "404 Not Found" error and with HTTPS the page is throwing a "403 Forbidden" error. I have PHP latest version in...
I'm trying to install Wordpress using OpenLiteSpeed webserver. Wordpress is installed in /usr/local/lsws/Liveragi/html/{wordpress files}. When I access the page using HTTP the page has a "404 Not Found" error and with HTTPS the page is throwing a "403 Forbidden" error. I have PHP latest version installed and the web panel works well. If I put an .html file it works but if it is PHP, I get "403 Forbidden". Hope someone has the solution to this. Thanks. PS: I'm using Ubuntu Server latest version
Jan Sánchez Van Den Berg (21 rep)
Oct 15, 2020, 08:25 AM • Last activity: Mar 1, 2025, 09:01 AM
2 votes
2 answers
155 views
Wordpress tries to connect as 'username_here'@'localhost' to MYSQL because of wp-config-sample.php
I run WordPress on my server, and everything is working well. However, 1-2 times a day, I get the following warning in my Syslog: ``` Dec 26 04:48:35 my_hostname mariadbd[895]: 2024-12-26 4:48:35 12606 [Warning] Access denied for user 'username_here'@'localhost' (using password: YES) ``` Now, I sear...
I run WordPress on my server, and everything is working well. However, 1-2 times a day, I get the following warning in my Syslog:
Dec 26 04:48:35 my_hostname mariadbd: 2024-12-26  4:48:35 12606 [Warning] Access denied for user 'username_here'@'localhost' (using password: YES)
Now, I searched the entire server with SilverSearcher, and the only location where username_here is used on the entire server is within the wp-config-sample.php, which looks exactly like the original one [here](https://github.com/WordPress/WordPress/blob/master/wp-config-sample.php) . I modified the username there to username_here_example, and the following log looks like this, confirming that this file is the source.
Dec 26 21:24:13 my_hostname mariadbd: 2024-12-26 21:24:13 19868 [Warning] Access denied for user 'username_here_example'@'localhost' (using password: YES)
However, from my understanding, WordPress should never use these credentials to connect, as this is only the default config. As far as I can tell, WordPress usually uses the credentials in wp-config.php to connect to the database, and the website works just fine, and the WordPress database looks okay, too. Any hints for what could cause this behaviour?
Erik (31 rep)
Dec 26, 2024, 09:55 PM • Last activity: Dec 31, 2024, 03:10 AM
0 votes
1 answers
29 views
How to log which application process removes a file from the server?
I have a situation and have described it [here][1] . In short: Images from WP are randomly missing from the server while being kept in the database. I am confident that this is done through application and not by some user. I am thinking of implementing a script to record when image from specific fo...
I have a situation and have described it here . In short: Images from WP are randomly missing from the server while being kept in the database. I am confident that this is done through application and not by some user. I am thinking of implementing a script to record when image from specific folder is removed from the server. I want to know which application is removing it in as much detail as possible. All I need is a few logs. Is it possible and how to do it? UPDATE I do not have root access to the server, best if we look at it as it is a shared hosting on Cpanel
Oktarin (1 rep)
Nov 20, 2024, 02:51 PM • Last activity: Nov 21, 2024, 09:31 AM
0 votes
1 answers
224 views
How to certbot renew without stopping webserver?
Good day, I'm having a problem renewing a domain with `certbot`. This is the error I'm getting: root@mywebserver:~# certbot renew Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Processing /etc/letsencrypt/renew...
Good day, I'm having a problem renewing a domain with certbot. This is the error I'm getting: root@mywebserver:~# certbot renew Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Processing /etc/letsencrypt/renewal/mywebsite.com.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Renewing an existing certificate for mywebsite.com and www.mywebsite.com Failed to renew certificate mywebsite.com with error: Could not bind TCP port 80 because it is already in use by another process on this system (such as a web server). Please stop the program in question and then try again. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - All renewals failed. The following certificates could not be renewed: /etc/letsencrypt/live/mywebserver.com/fullchain.pem (failure) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 renew failure(s), 0 parse failure(s) Currently, I'm running a Wordpress instance with OpenLiteSpeed WordPress One-Click app, which is supposed to automatically renew certs for me, but it hasn't been the case. The image comes with automatic certificate renewal by default in /etc/cron.d/certbot: SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew --deploy-hook "systemctl restart lsws" 0 0 * * 3 root systemctl restart lsws I mean, sure, I can go and stop my webserver and proceed with certbot renew process, but then I wont be able to fix this and go through all this again once the certificate ends again. Huge thanks in advance to anyone who jumps in to help me with this.
Alain Alemany (345 rep)
Nov 13, 2024, 04:03 PM • Last activity: Nov 13, 2024, 04:23 PM
2 votes
3 answers
643 views
Apache Permissions Linux
* wordpress runs as the `apache` user * `apache` is in the `developers` group * all folders are `775` * all files are `664` * all folders and files are in the `developers` group Why does `apache` need to own the files in order for Wordpress to install/update plugins?
* wordpress runs as the apache user * apache is in the developers group * all folders are 775 * all files are 664 * all folders and files are in the developers group Why does apache need to own the files in order for Wordpress to install/update plugins?
Asif (21 rep)
Jan 17, 2017, 01:48 PM • Last activity: Aug 11, 2024, 10:06 AM
0 votes
2 answers
201 views
ed(1) adds ^M to every line of my file
I am working on automating a WordPress install. While editing wp-config.php file, I need to replace 8 lines containing `put your unique phrase here` with Salt generated by WordPress.org servers. So, I used the top answer from [this tread][1] which tells me to run this script: ```bash #!/bin/sh SALT=...
I am working on automating a WordPress install. While editing wp-config.php file, I need to replace 8 lines containing put your unique phrase here with Salt generated by WordPress.org servers. So, I used the top answer from this tread which tells me to run this script:
#!/bin/sh

SALT=$(curl -L https://api.wordpress.org/secret-key/1.1/salt/) 
STRING='put your unique phrase here'
printf '%s\n' "g/$STRING/d" a "$SALT" . w | ed -s wp-config.php
This works just fine, as it replaces the required lines with proper salt. However, it also appends a ^M at the end of every string in wp-config.php, except the newly added ones. Now it looks like this:
*/^M
^M
define('AUTH_KEY',         '|%)Y1>vzXGRbE?`FFZX3Mq|ur?tN/,R&%@)juSc?f@bNPYm~P=aF&Fl?!HGF4V}a');
define('NONCE_SALT',       '6;KHO6=[Ta-h7.2B@3SadaIinz/6!O=GQWE(@r(<3L+X,/:[du%Q');
/**
**/^M
^M
/**^M
 * WordPress Database Table prefix.^M
I don't know much about ed(1), so any help will be much appreciated.
user377738
Oct 17, 2019, 02:40 PM • Last activity: Jul 19, 2024, 08:37 PM
0 votes
1 answers
76 views
.htaccess configuration with static page and wordpress
Apparently I'm drawing a blank - must be a simple, stupid issue.... Scenario: Website hosted by a provider w/ Apache WS - no root access. Existing **static** website is located in folder public_html (index.html). The existing .htaccess contains a single line: `DirectoryIndex index.html`. The server'...
Apparently I'm drawing a blank - must be a simple, stupid issue.... Scenario: Website hosted by a provider w/ Apache WS - no root access. Existing **static** website is located in folder public_html (index.html). The existing .htaccess contains a single line: DirectoryIndex index.html. The server's start directory is public_html. A working WordPress Installation is located in public_html/folder_wp (i. e. when switching the server's start directory from public_html to public_html/folder_wp WordPress is executed upon calling the website from any browser). The static website contains a button with link to folder_wp/index.php - the purpose is to redirect to the WP site from the static website. Both - static and WP site - share the same URL. Any hint highly welcome. -mgw Problem: When clicking the link that should launch to the WP site a 403 is displayed. I fiddled around with several settings in .htaccess to no avail and only ended up with either 404 or 500 besides the 403. Last tried with public_html/.htaccess and added directory index.php - funny enough I can now reach the WP site but when clicking anywhere I end up with 404 (wp_admin not found et al.)... guess I need some rewrite rule or else...? New .htaccess: #KONSOLE AREA START - PLEASE DO NOT EDIT MANUALLY BETWEEN THESE LINES DirectoryIndex index.html #KONSOLE AREA END - PLEASE ADD MANUAL CHANGES BELOW DirectoryIndex index.html index.php What am I missing?
mgw (13 rep)
Mar 31, 2024, 11:44 AM • Last activity: Apr 21, 2024, 04:25 PM
0 votes
0 answers
73 views
Mysql server under pressure?
I'm having issue with a server than hosting 5 Wordpress and 1 staging Including on Woocommerce and one Bbpress with huge db. The server got 120Go Ram with 500Mo swap set. I have a TTFB around 3s... And some SQL query make about 2s to get result. I solved a problem about an index with varchar(191) an...
I'm having issue with a server than hosting 5 Wordpress and 1 staging Including on Woocommerce and one Bbpress with huge db. The server got 120Go Ram with 500Mo swap set. I have a TTFB around 3s... And some SQL query make about 2s to get result. I solved a problem about an index with varchar(191) and table structure varachar(250) But I didn't get much from this I have some table with huge index mabe it's an other point to fix. I think main of my problem is due to MySQL server and SQL request latency. I already make several optimisation, using many level of cache (redis cache / website cache / DNS cache) But before switching on other technical point I would like to be sure to get the maximum from MySQL. Here is my.cnf file [mysql] #performance_schema = on #max_allowed_packet=4196M max_connections = 200 [client-server] # Import all .cnf files from configuration directory !includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mariadb.conf.d/ [mysqld] query_cache_size=64M join_buffer_size = 8M #bind-address = :: sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION local-infile=0 #max_allowed_packet=4196M net_buffer_length=16K wait_timeout=300 interactive_timeout=300 ####### Control slow query ###### slow_query_log = 1 slow_query_log_file = /var/log/mysql/mysql-slow.log long_query_time = 2 log_queries_not_using_indexes = 1 ####### CACHE - Management - 15/09/23 ###### tmp_table_size = 4096M max_heap_table_size = 4096M sort_buffer_size = 2M thread_cache_size = 16 #temptable_max_mmap = 4G #temptable_max_ram = 4G innodb_buffer_pool_size=48G innodb_log_file_size=6G innodb_buffer_pool_instances = 48 performance_schema=ON table_definition_cache=1500 skip-name-resolve=ON query_cache_size=8G #query_cache=0 [client] #wait_timeout=31536000 #max_allowed_packet=4196M [mysqldump] max_allowed_packet=4196M I was wondering if changing these values can help my problem tmp_table_size=256M max_heap_table_size=256M max_connections=500 thread_cache_size=50 innodb_log_file_size=512M innodb_buffer_pool_size=100G wait_timeout=300 interactive_timeout=300 net_buffer_length=64K max_allowed_packet=256M
Teal_cfr (1 rep)
Oct 10, 2023, 05:52 PM • Last activity: Oct 10, 2023, 08:23 PM
0 votes
1 answers
54 views
I encountered an error in the YAML script when using Docker
I am using version: '3.8' ``` services: mydb: image: mysql:5 environment: MYSQL_ROOT_PASSWORD: shiva mywordpress: image: wordpress ports: - 8080:80 links: - mydb: sqldb ``` Below is the error message: ``` services.mywordpress.links.0 must be a string ```
I am using version: '3.8'
services:
  mydb:
    image: mysql:5
    environment:
      MYSQL_ROOT_PASSWORD: shiva

  mywordpress:
    image: wordpress
    ports:
     - 8080:80
    links:
     - mydb: sqldb
Below is the error message:
services.mywordpress.links.0 must be a string
shivasai11 (1 rep)
Jul 4, 2023, 09:35 AM • Last activity: Jul 4, 2023, 10:26 AM
0 votes
2 answers
1315 views
Cron Error: No such file or directory
Looking for some guidance around setting up a cron job to run every 15 minutes that sets off a script within the WordPress Plugin Amelia. According to their docs, I need to add the following line to the Cron file: `*/15 * * * * https://domain.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/not...
Looking for some guidance around setting up a cron job to run every 15 minutes that sets off a script within the WordPress Plugin Amelia. According to their docs, I need to add the following line to the Cron file: */15 * * * * https://domain.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send Now as I'm using CPanel I set up the cronjob using the gui so it looks something like this. Swapping https://domain.com for the actual domain.: enter image description here I've added quotes to the command as I was getting errors because it was splitting the command when reaching an & but I am still getting an error saying the directory is not found. Any help would be great. Thank you in advance.
Daniel Sissons (101 rep)
Jun 7, 2020, 10:20 AM • Last activity: Jul 3, 2023, 10:30 AM
1 votes
2 answers
323 views
Running Nginx as different user; updating WordPress returns "The update cannot be installed ..." error
This is my first foray into customizing Nginx, which I have running on a Digital Ocean droplet. My site files are located in `/sites/rob_app`. - everything is owned by `rob` - all files are `0644` - all directories are `0755` I changed the user that Nginx runs as to `rob` in `nginx.conf`. The site r...
This is my first foray into customizing Nginx, which I have running on a Digital Ocean droplet. My site files are located in /sites/rob_app. - everything is owned by rob - all files are 0644 - all directories are 0755 I changed the user that Nginx runs as to rob in nginx.conf. The site runs, but if I try to update WordPress or any plugins, I get the following error:
Unpacking the update…

The update cannot be installed because some files could not be copied. This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php

Installation failed.
From Nginx error log, it sounds like a file permission issue, but I'm running Nginx as rob and my file owner is rob:
2023/01/27 01:08:51 [error] 11253#11253: *6 FastCGI sent in stderr: "PHP message: PHP Warning:  copy(/sites/rob_app/subdomains/vril/public/wp-admin/includes/update-core.php): Failed to open stream: Permission denied in /sites/rob_app/subdomains/vril/public/wp-admin/includes/class-wp-filesystem-direct.php on line 309" while reading upstream, client: (redacted)), server: vril.robr.app, request: "POST /wp-admin/update-core.php?action=do-core-reinstall HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "(redacted)", referrer: "(redacted)/wp-admin/update-core.php"
When I change the file owner for all sites files to www-data and change the user that Nginx runs as to www-data, then I can successfully update WordPress and plugins, but as rob, **I can't add or modify any files within /sites/ without using sudo.** I'm scratching my head over why r**unning Nginx as www-data with www-data as the file owner works**, but **running Nginx as rob with rob as the file owner does not** (even though the file permissions are unchanged between the switch). My nginx.conf:
user rob;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
	worker_connections 1024;
}

http {
	sendfile on;
	tcp_nopush on;
	types_hash_max_size 2048;
	server_tokens off; 

	include /etc/nginx/mime.types;
	default_type application/octet-stream;

	ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
	ssl_prefer_server_ciphers on;

	access_log /var/log/nginx/access.log;
	error_log /var/log/nginx/error.log;

	include /etc/nginx/conf.d/*.conf;
	include /etc/nginx/sites-enabled/*;

	# https://sysopstechnix.com/7-tips-for-nginx-performance-tuning/ 
    client_body_buffer_size 10K;
	client_header_buffer_size 1k;
	client_max_body_size 8m;
	large_client_header_buffers 4 4k;	
	ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;

	add_header Last-Modified "";    
}
rob (11 rep)
Jan 27, 2023, 01:15 AM • Last activity: Jun 18, 2023, 02:58 AM
1 votes
0 answers
32 views
enhance performance in XEN VMs when copying lots of files inside the host
When I copy large amounts of data back and forth on my Debian XEN server in the host-VM, the server response in the webserver-VM with `nginx` becomes very slow. This is how I cause the problem 1. in the host VM: rsync -avR /lots/of/files/from/synapse/media_store/ /backup/tmp_matrix_media_store/ 2. i...
When I copy large amounts of data back and forth on my Debian XEN server in the host-VM, the server response in the webserver-VM with nginx becomes very slow. This is how I cause the problem 1. in the host VM: rsync -avR /lots/of/files/from/synapse/media_store/ /backup/tmp_matrix_media_store/ 2. in the webserver I monitor the download speed with while true; do echo $(date)" - $({ time -p curl -sSf https://test.org?$RANDOM|grep something; } |& grep real)"; done | tee -a /var/log/nginx/performance.log Di 23. Mai 09:25:45 UTC 2023 - real 0,73 Di 23. Mai 09:25:45 UTC 2023 - real 0,20 ... I also tried using ionice -c2 -n7 rsync -avR ... to make the copy process less hungry, but this does not help. Workaround: If I use rsync --bwlimit=10M ... this will slow down the copy progress to max 10 MB/s and and I won't get any problem in the VM. The server has a CPU : AMD Ryzen 7 3700X Octa-Core with 64GB RAM and the webserver-VM has 4 cores added What can I do to improve performance?
rubo77 (30435 rep)
May 23, 2023, 09:29 AM • Last activity: May 24, 2023, 09:35 AM
0 votes
0 answers
48 views
Apache - Move /wordpress installation to main website address
I just re-installed wordpress in Debian server and it sits in /var/www/html/wordpress directory. I used wordpress in the past, so I have partially configured things, just need to polish it a bit. I would like to have wordpress on the main address mywebsite.com. So I need to redirect entire wordpress...
I just re-installed wordpress in Debian server and it sits in /var/www/html/wordpress directory. I used wordpress in the past, so I have partially configured things, just need to polish it a bit. I would like to have wordpress on the main address mywebsite.com. So I need to redirect entire wordpress from /var/www/html/wordpress to main apache root directory. I am a bit overwhelmed with all options available. I have so far determined that I could/should edit configuration of: /etc/apache2/apache2.conf This file contains currently (among other lines): Options FollowSymLinks AllowOverride None Require all denied AllowOverride None Require all granted Options Indexes FollowSymLinks AllowOverride None Require all granted I don't know if this is correct or not. Furthermore: /etc/apache2/sites-enabled/default-ssl.conf This one says: DocumentRoot /var/www/html/ And lastly, I use 443 https only, very nicely secured with Let's Encrypt, defined in: /etc/apache2/sites-enabled/000-default.conf I use proxy redirection there, so my unrelated service is available online via https under mywebsite.com/service. That I want to stay as it is, unrelated to wordpress, is works very well currently. This is the entire file: RewriteEngine on RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R] RewriteCond %{SERVER_NAME} =mywebsite.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] SSLStaplingCache shmcb:/var/run/apache2/stapling_cache(128000) ServerAdmin webmaster@localhost DocumentRoot /var/www/html/ ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined ProxyPass /service http://127.0.0.1:port/service ProxyPassReverse /service http://127.0.0.1:port/service ServerName mywebsite.com Include /etc/letsencrypt/options-ssl-apache.conf Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" SSLUseStapling on SSLCertificateFile /etc/letsencrypt/live/mywebsite.com/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/mywebsite.com/privkey.pem Can someone tell me please where should make this entry so wordpress installed in /var/www/html/wordpress is displayed as my main website address, https://mywebsite.com ? And I still have my other service available under mywebsite.com/service? I tried some configuration changes and it worked, but I realized that https://mywebsite.com/wp-login.php does not redirect properly and I can't login to wordpress. Thank you!
saXh26Ql0zkF (53 rep)
May 22, 2023, 10:21 AM • Last activity: May 22, 2023, 10:36 AM
0 votes
0 answers
172 views
Cannot change or remove a file as root
This is driving me nuts... There's a lot of info over the place and I've spent quite some hours already without any success. A customer of mine haves a website compromised with some japanese SEO spam (seems to be a known threat for wordpress websites: https://labs.sucuri.net/signatures/sitecheck/spa...
This is driving me nuts... There's a lot of info over the place and I've spent quite some hours already without any success. A customer of mine haves a website compromised with some japanese SEO spam (seems to be a known threat for wordpress websites: https://labs.sucuri.net/signatures/sitecheck/spam-seo/?japanese.0) I'm using Ubuntu 20.04.6 LTS and the latest WordPress (all the plugins and core updated, restored core files from a fresh download as well, with sucuri, iThemes Security and Wordfence installed) Unfortunately rolling back to a previous safe-state is not possible being that there are many transactions that happened since then, and we're uncertain about when the malware got introduced. Now everything seems to be cleaned up, except one single thing: the index.php file. There's NO WAY to remove / edit / do anything with this file, even by using the root user.
`
[root@site /home/xxxx.com/public_html] # ls -l index.php
-r--r--r--  1 www www  6982 Apr 13  2022 index.php

[root@site /home/xxxx.com/public_html] # lsattr index.php
--------------e----- ./index.php

[root@site /home/xxxx.com/public_html] # chmod 755 index.php
[root@site /home/xxxx.com/public_html] # ls -l index.php
-r--r--r--  1 www www  6982 Apr 13  2022 index.php

[root@site /home/xxxx.com/public_html] # rm -f index.php
[root@site /home/xxxx.com/public_html] # ls -l index.php
-r--r--r--  1 www www  6982 Apr 13  2022 index.php
`` So no matter what I do, the file remains untouched. Already verified, it's not a symlink (nor a hardlink), and the content is always the same:
Does anybody know what can possibly be happening here? Any help would be greatly appreciated! :)
nnimis (101 rep)
May 18, 2023, 11:07 PM
0 votes
0 answers
1182 views
configure SELinux for Wordpress on Apache, Almalinux
I have an issue with SELinux that when enforcing (enabled) causes Wordpress on Apache to throw errors in the header like: >*Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums...
I have an issue with SELinux that when enforcing (enabled) causes Wordpress on Apache to throw errors in the header like: >*Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /var/www/html/mywebsite.com/wp-admin/includes/plugin-install.php on line 183* or lower in the body like:
>*An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.* There are a lot of other articles that have these same errors, and most of them talk about connectivity (name resolution, hosting firewalls etc) but none of those are my issues. If I disable SELinux either by setting # setenforce 0 or by disabling it in **/etc/selinux/config** then everything works fine. Looking at rules which seem should suffice.. # semanage fcontext -l | grep "www/html"
/var/www/html(/.*)?/sites/default/files(/.*)?      all files          system_u:object_r:httpd_sys_rw_content_t:s0
/var/www/html(/.*)?/sites/default/settings\.php    regular file       system_u:object_r:httpd_sys_rw_content_t:s0
/var/www/html(/.*)?/uploads(/.*)?                  all files          system_u:object_r:httpd_sys_rw_content_t:s0
/var/www/html(/.*)?/wp-content(/.*)?               all files          system_u:object_r:httpd_sys_rw_content_t:s0
/var/www/html(/.*)?/wp_backups(/.*)?               all files          system_u:object_r:httpd_sys_rw_content_t:s0
The current base path for the website is at: **/var/www/html/mywebsite.com** Is there something else that needs to be policed to allow it to not throw these errors?
The goal is to utilize SELinux as intended, not to disable it. Here are the http boolean values as requested
$ getsebool -a | grep httpd
httpd_anon_write --> off
httpd_builtin_scripting --> on
httpd_can_check_spam --> off
httpd_can_connect_ftp --> off
httpd_can_connect_ldap --> off
httpd_can_connect_mythtv --> off
httpd_can_connect_zabbix --> off
httpd_can_manage_courier_spool --> off
httpd_can_network_connect --> off
httpd_can_network_connect_cobbler --> off
httpd_can_network_connect_db --> off
httpd_can_network_memcache --> off
httpd_can_network_relay --> off
httpd_can_sendmail --> off
httpd_dbus_avahi --> off
httpd_dbus_sssd --> off
httpd_dontaudit_search_dirs --> off
httpd_enable_cgi --> on
httpd_enable_ftp_server --> off
httpd_enable_homedirs --> off
httpd_execmem --> off
httpd_graceful_shutdown --> off
httpd_manage_ipa --> off
httpd_mod_auth_ntlm_winbind --> off
httpd_mod_auth_pam --> off
httpd_read_user_content --> off
httpd_run_ipa --> off
httpd_run_preupgrade --> off
httpd_run_stickshift --> off
httpd_serve_cobbler_files --> off
httpd_setrlimit --> off
httpd_ssi_exec --> off
httpd_sys_script_anon_write --> off
httpd_tmp_exec --> off
httpd_tty_comm --> off
httpd_unified --> off
httpd_use_cifs --> off
httpd_use_fusefs --> off
httpd_use_gpg --> off
httpd_use_nfs --> off
httpd_use_opencryptoki --> off
httpd_use_openstack --> off
httpd_use_sasl --> off
httpd_verify_dns --> off
TexasTim (23 rep)
May 6, 2023, 10:41 PM • Last activity: May 7, 2023, 03:10 AM
0 votes
0 answers
39 views
wordpress can not find database, while mysql_client can
I am trying to prepare a WordPress site, on my public web server, running apache2. The database host, I am trying to use, for the WordPress installation, is another server. While I can successfully connect the db_host from my web server, through MySQL client, WordPress configuration can not connect...
I am trying to prepare a WordPress site, on my public web server, running apache2. The database host, I am trying to use, for the WordPress installation, is another server. While I can successfully connect the db_host from my web server, through MySQL client, WordPress configuration can not connect the database. enter image description here Though mysql_client works from the same machine enter image description here Please help me
manmatha.roy (207 rep)
Jan 24, 2023, 02:51 PM • Last activity: Jan 24, 2023, 03:32 PM
0 votes
1 answers
75 views
How can I get MariaDB to resume action?
I was working on my Wordpress site, and to get a non-database, HTML version suitable for my [datamine](https://github.com/JonathanHayward/datamine), such as is running correctly at https://orthodoxchurchfathers.com and https://searchgkchesterton.com, ran a `wget -r --no-check-certificate https://cjs...
I was working on my Wordpress site, and to get a non-database, HTML version suitable for my [datamine](https://github.com/JonathanHayward/datamine) , such as is running correctly at https://orthodoxchurchfathers.com and https://searchgkchesterton.com , ran a wget -r --no-check-certificate https://cjshayward.com to create a partial version of the site with pages as individual files insteaad of database-dependent. When I went to see if it is working, it gave a Wordpress error page that says "Error establishing a database connection." A little poking and it turned up that Mariadb's server was not running, and this not running persisted after a reboot. From the command line: # service mysqld start Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details. root@technoluddites:~/wordpress/wp-content# systemctl status mariadb.service ● mariadb.service - MariaDB 10.3.22 database server Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2022-11-15 12:44:41 CST; 15s ago Docs: man:mysqld(8) https://mariadb.com/kb/en/library/systemd/ Process: 5287 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS) Process: 5288 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) Process: 5290 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=/usr/bin/galera_recovery; [ $? -eq 0 ] && systemctl set-environment _WSREP_STA Process: 5342 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE) Main PID: 5342 (code=exited, status=1/FAILURE) Status: "MariaDB server is down" Nov 15 12:44:34 technoluddites.org systemd: Starting MariaDB 10.3.22 database server... Nov 15 12:44:35 technoluddites.org mysqld: 2022-11-15 12:44:35 0 [Note] /usr/sbin/mysqld (mysqld 10.3.22-MariaDB-0+deb10u1) starting as process 5342 ... Nov 15 12:44:41 technoluddites.org systemd: mariadb.service: Main process exited, code=exited, status=1/FAILURE Nov 15 12:44:41 technoluddites.org systemd: mariadb.service: Failed with result 'exit-code'. Nov 15 12:44:41 technoluddites.org systemd: Failed to start MariaDB 10.3.22 database server. root@technoluddites:~/wordpress/wp-content# journalctl -xe Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to partcafe.com[162.210.199.85]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to xrumer.app[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to shavers.hair[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to hard.raytoy.com[23.82.12.35]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to hard.raytoy.com[37.48.65.136]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to makeup.blue[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to free.pieurl.com[81.171.28.46]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to partcafe.com[23.82.12.37]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to hard.raytoy.com[37.48.65.136]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to xrummer.com[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to koobiyocabs.com[99.83.154.118]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to partcafe.com[185.107.56.54]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to customketodiet.tips[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to customketodiet.kitchen[99.83.154.118]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to partcafe.com[185.107.56.54]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to xrummer.com[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to 1000welectricscooter.com[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to e.razore100.fans[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to chestpain.one[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to thailandmovers.com[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to linkbuildingtools.club[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to c.bangkokremovals.com[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to a.roofvent.xyz[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to xrummer.com[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to c.razore100.fans[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to e.shavers.hair[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to d.japantravel.network[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to customketodiet.kitchen[99.83.154.118]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to a.singaporetravel.network[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to a.southafricatravel.club[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to f.babyteeth.club[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to dnatest.news[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to i.most-wanted-stuff.com[64.44.23.135]:25: Connection timed out Nov 15 12:45:15 technoluddites.org postfix/smtp: connect to a.australia-travel.news[64.44.23.135]:25: Connection timed out Nov 15 12:45:17 technoluddites.org CRON: pam_unix(cron:session): session closed for user root Nov 15 12:45:20 technoluddites.org sshd: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=212.34.245.65 user=root Nov 15 12:45:22 technoluddites.org sshd: Failed password for root from 212.34.245.65 port 43956 ssh2 Nov 15 12:45:23 technoluddites.org sshd: Received disconnect from 212.34.245.65 port 43956:11: Bye Bye [preauth] Nov 15 12:45:23 technoluddites.org sshd: Disconnected from authenticating user root 212.34.245.65 port 43956 [preauth] Nov 15 12:45:25 technoluddites.org sshd: Connection closed by 125.119.1.16 port 21724 [preauth] The searching I've done so far has turned up results saying "Clear the data directory if you don't have anything worth mentioning in the data directory," and maybe to reinstall MariaDB, but have not yet offered any advice on what to do if I don't want to lose something that in fact is worth keeping to me in the database. I've put a little duct tape on my site by tarring up the Wordpress installation directory and then doing: # for x in find . -name \*.html; do cp --parents $x ~/wordpress; echo $x; done from the snapshot created by wget, and after renaming ~/wordpress/index.php, it serves the site more or less as before. So, the symptom is at least partly suppressed by now, but in a way that does nothing to address the problem. A next thought that I have is to move out, instead of deleting, database files, see if I can get it working, and then see if I can pin down what stops MariaDB from starting. I have previously run a recursive wget without reported issue. How did attempting a wget take down, or trigger taking down, the database? What can I do to get MariaDB working without discarding the databases? Are there any approaches besides systematically moving out databases and seeing whether MariaDB will start? Would it make sense to migrate to MySQL?
Christos Hayward (529 rep)
Nov 15, 2022, 07:06 PM • Last activity: Nov 15, 2022, 11:57 PM
Showing page 1 of 20 total questions