╔════════════════════════════════════════════════╗ ║ Apache Recovery Script with Logging ║ ║ Full log: /tmp/apache_recovery_20260203_025025.log ║ ╚════════════════════════════════════════════════╝  [INFO] 2026-02-03 02:50:25 - Starting Apache recovery process... [INFO] 2026-02-03 02:50:25 - Step 1: Stopping all services... [DEBUG] 2026-02-03 02:50:31 - Apache stopped [DEBUG] 2026-02-03 02:50:31 - PHP-FPM stopped [WARN] 2026-02-03 02:50:31 - Some services were already stopped [INFO] 2026-02-03 02:50:31 - Step 2: Cleaning configuration files... [DEBUG] 2026-02-03 02:50:31 - Configs backed up to /etc/httpd/backup_20260203_025031 [DEBUG] 2026-02-03 02:50:31 - Removed all configs from conf.d [INFO] 2026-02-03 02:50:31 - Step 3: Creating minimal working configuration... [DEBUG] 2026-02-03 02:50:31 - Creating 00-servername.conf [DEBUG] 2026-02-03 02:50:31 - Creating pinkcookietv.conf [DEBUG] 2026-02-03 02:50:31 - Disabling ModSecurity temporarily [WARN] 2026-02-03 02:50:31 - ModSecurity config not found [INFO] 2026-02-03 02:50:31 - Step 4: Fixing permissions and directories... [DEBUG] 2026-02-03 02:50:32 - Permissions fixed [INFO] 2026-02-03 02:50:32 - Step 5: Creating test files... [DEBUG] 2026-02-03 02:50:32 - Creating test.html [DEBUG] 2026-02-03 02:50:32 - Creating test.php [DEBUG] 2026-02-03 02:50:32 - Creating ilove/debug.php [DEBUG] 2026-02-03 02:50:32 - Creating .htaccess [INFO] 2026-02-03 02:50:32 - Step 6: Validating configuration... [INFO] 2026-02-03 02:50:32 - Configuration syntax: OK [INFO] 2026-02-03 02:50:32 - Step 7: Starting services... [DEBUG] 2026-02-03 02:50:32 - Starting Apache... [INFO] 2026-02-03 02:50:34 - Apache status: ACTIVE [INFO] 2026-02-03 02:50:34 - Step 8: Running tests... === TEST RESULTS === [DEBUG] 2026-02-03 02:50:34 - Test 1: HTML access HTML Test: PASS (HTTP 200) [DEBUG] 2026-02-03 02:50:34 - Test 2: PHP access PHP Test: PASS (HTTP 200) [DEBUG] 2026-02-03 02:50:34 - Test 3: ilove debug access ilove Debug: PASS (HTTP 200) [DEBUG] 2026-02-03 02:50:34 - Test 4: Original index.php Original index.php: HTTP 200 [DEBUG] 2026-02-03 02:50:34 - Test 5: Checking logs Error Log: 0 recent errors [INFO] 2026-02-03 02:50:34 - Step 9: Final checks... === SERVICE STATUS === ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2026-02-03 02:50:32 MSK; 2s ago Docs: man:httpd(8) man:apachectl(8) Main PID: 8992 (httpd) Status: "Processing requests..." Tasks: 6 Memory: 17.8M CGroup: /system.slice/httpd.service ├─8992 /usr/sbin/httpd -DFOREGROUND ├─8993 /usr/sbin/httpd -DFOREGROUND ├─8995 /usr/sbin/httpd -DFOREGROUND ├─8996 /usr/sbin/httpd -DFOREGROUND ├─8997 /usr/sbin/httpd -DFOREGROUND └─8998 /usr/sbin/httpd -DFOREGROUND Feb 03 02:50:32 karamel systemd[1]: Starting The Apache HTTP Server... Feb 03 02:50:32 karamel systemd[1]: Started The Apache HTTP Server. === CONFIGURATION FILES === total 12 drwxr-xr-x 2 root root 71 Feb 3 02:50 . drwxr-xr-x 8 root root 173 Feb 3 02:50 .. -rw-r--r-- 1 root root 62 Feb 3 02:50 00-servername.conf -rw-r--r-- 1 root root 878 Feb 3 02:50 pinkcookietv.conf -rw-r--r-- 1 root root 366 May 30 2023 README === LISTENING PORTS === No IPv4 ports found === QUICK ACCESS LINKS === Test HTML: curl http://localhost/test.html Test PHP: curl http://localhost/test.php Debug ilove: curl http://localhost/ilove/debug.php Original: curl -v http://localhost/ilove/index.php View logs: sudo tail -f /web/pinkcookietv.ru/logs/error.log Remove test files? (y/n): [INFO] 2026-02-03 02:50:45 - Cleaning up test files... [DEBUG] 2026-02-03 02:50:45 - Test files removed [INFO] 2026-02-03 02:50:45 - Recovery process completed! ╔════════════════════════════════════════════════╗ ║ RECOVERY COMPLETE! ║ ╚════════════════════════════════════════════════╝ Summary: • Apache is running with minimal configuration • ModSecurity is temporarily disabled • Test files created for verification • Full log saved to: \033[0;34m/tmp/apache_recovery_20260203_025025.log\033[0m • Backup of old configs in: \033[0;34m/etc/httpd/backup_20260203_025031\033[0m Next steps: 1. Test your application: curl http://localhost/ilove/index.php 2. Check for PHP errors in debug file 3. Re-enable ModSecurity gradually if needed 4. Review the log file for any issues