워드프레스 로그인 무작위 대입 공격을 막는 방법입니다. All In One WP Security 같은 플러그인으로도 방어가 가능하지만 mod_qos 에 아래의 옵션으로 여러개의 VirtualHost 전체에 대한 Brute force 공격을 막아줄 수가 있습니다. <IfModule mod_qos.c> SetEnvIf Request_URI ^/wp-login(.*)$ LimitLogin QS_ClientEventLimitCount 10 3600 LimitLogin <Location /__qos> SetHandler qos-viewer Order Deny,Allow Deny from All Allow from 192.168. </Location> </IfModule> 1시간…
작성자: itrooms
[CentOS] 8 Stream phpMyAdmin dnf 설치 방법
CentOS 8.x 버전에서 부터는 yum install phpMyAdmin 으로 설치가 안되는군요~ 직접 다운로드 받아서 설치하는 방법이 있긴 하지만 엄청 번거롭습니다. 아래는 dnf 명령어로 간단하게 설치 하는 방법입니다. dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm dnf -y –enablerepo=remi install phpMyAdmin 엄청 간단하지요~ ㅎ 이제 외부에서 접속이 가능하게 아파치 설정을 바꾸어 주면 됩니다. <Directory /usr/share/phpMyAdmin/>…

[CentOS] 8 Stream phpMyAdmin Error session_start
CentOS 8 Stream 버전에서 phpMyAdmin 을 다운로드 받아서 설치했더니 아래와 같은 오류가 나오네요~ phpMyAdmin Error session_start Failed Permision denied session.save_path 디렉토리의 퍼미션을 확인해 봐야겠습니다. phpMyAdmin – Error Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser. session_start():…
[CentOS] 8 Stream mysql 비밀번호 초기화 방법
CentOS 8.x 버전에서 테스트 되었지만 7.x 버전에서도 동일합니다. mariadb 비밀번호가 기억나지 않을때 초기화 시켜주는 방법입니다. [root@itrooms ~]# systemctl stop mariadb [root@itrooms ~]# mysqld_safe –skip-grant-tables –skip-networking & [1] 4185 [root@itrooms ~]# 230202 13:55:29 mysqld_safe Logging to ‘/var/log/mariadb/mariadb.log’. 230202 13:55:29 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 먼저 mariadb 데몬을 stop 시켜줍니다. 그리고 두번째…
[CentOS] phpMyAdmin $cfg[]TempDir 엑세스할 수 없음
CentOS 8 Stream 버전에서 dnf 로 phpMyAdmin 을 설치했더니 로그인 하고 첫 화면에 아래와 같은 문구가 보이는군요~ $cfg[]TempDir”(/var/lib/phpMyAdmin/temp/)에 액세스할 수 없음. phpMyAdmin은 템플릿을 캐시할 수 없으며 이로 인해 속도가 느려질 것이다. [root@itrooms phpMyAdmin]# ls -l /var/lib/phpMyAdmin/ total 0 drwxr-x—. 2 apache apache 30 Feb 1 14:36 cache drwxr-x—. 2 apache apache 6 May…
[CentOS] 7.x PHP-FPM AH02454 AH01079
CentOS 7.9 에서 아파치 + PHP-FPM 포트 방식으로 잘 돌아가던 환경에서 소켓 방식으로 바꿨더니 아래와 같은 에러를 뿜어내는군요~ [Wed Feb 01 08:27:58.928096 2023] [proxy:error] [pid 3661] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket /var/opt/remi/php81/run/php-fpm/www.sock (*) failed [Wed Feb 01 08:27:58.928143 2023] [proxy_fcgi:error] [pid 3661] [client xxx.xxx.xxx.xxx:50967] AH01079: failed to make connection to backend: httpd-UDS PHP8.1 PHP8.2 같은 소켓방식으로 설정했는데 8.2버전은 멀쩡합니다. 8.1에서만 문제가 생기던데 일단 소켓 파일의 퍼미션 부터 확인해 보니 두 파일의 퍼미션이 다르군요~ [root@ivps ~]# ls -l /var/opt/remi/php74/run/php-fpm/www.socksrw-rw—- 1 root root 0 Feb 1 10:04 /var/opt/remi/php74/run/php-fpm/www.sock [root@ivps ~]# ls -l /var/opt/remi/php81/run/php-fpm/www.socksrw-rw—- 1 root root 0 Jan 31 17:56 /var/opt/remi/php81/run/php-fpm/www.sock[root@ivps ~]# ls -l…
[CentOS] NGINX 소켓방식 Permission denied 문제
PHP-FPM 설정파일에서 listen 부분을 포트방식에서 소켓으로 변경했더니 아래와 같은 오류가 발생하는군요~ listen = /var/opt/remi/php74/run/php-fpm/www.sock ;listen = 127.0.0.1:9074 2023/01/31 06:00:01 [crit] 2476#0: *1 connect() to unix:/var/opt/remi/php74/run/php-fpm/www.sock failed (13: Permission denied) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: www.example.com, request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/var/opt/remi/php74/run/php-fpm/www.sock:”, host: “www.example.com” # chown nginx:nginx /var/opt/remi/php74/run/php-fpm/www.sock 이렇게 소유권을 바꿔주는 방법도 있긴하지만 systemctl restart php74-php-fpm 을 하면 다시 퍼미션을 원래대로 돌아가서 매번 변경해주어야 합니다. 매번 변경해주던지 포트 방식으로 바꾸던지 해야겠습니다. 이 글은 ivps.tistory.com 에서 RSS로…
[CentOS] 파티션타입 Microsoft basic 변경 방법
오라클 클라우드에서 부트볼륨을 200GB 로 생성해서 확장을 했더니 파티션 Type 이 “Microsoft basic” 으로 되어있네요~ [root@itrooms ~]# fdisk -l WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion. Disk /dev/sda: 214.7 GB, 214748364800 bytes, 419430400 sectors Units = sectors of 1 * 512 = 512 bytes…
[WordPress] PHP8.2 script-loader.php load.php 에러
PHP 7.2, 7.4 버전에서 멀쩡하던게 8.1, 8.2 버전에서 오류가 발생하네요~ AH01071: Got error ‘PHP message: PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home/example/www/_wp_/wp-includes/script-loader.php on line 757’ AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /home/example/www/_wp_/wp-includes/load.php:926 /wp-includes/script-loader.php foreach…
[CentOS] proxy_fcgi error AH01071 Primary script unknown
리눅스는 버전이 바뀔때 마다 PHP Multiple 패키지 설치할때 마다 오류 때문에 문제군요~ 웹브라우저 화면에는 “File not found.” 가 뜨고 아파치 에러 로그엔 아래 처럼 로그가 나옵니다. [proxy_fcgi:error] [pid 27067] [client XXX.XXX.XXX.XXX:63340] AH01071: Got error ‘Primary script unknown’ 아파치 설정에서 ProxyPassMatch 를 사용했더니 위와 같은 에러가 발생하네요~ #ProxyPassMatch ^/(.*\.(php|htm|html)(/.*)?)$ fcgi://127.0.0.1:9082/home/example/www/$1 위의 방식을…

오라클 클라우드 VM 무료 최대 용량
오라클 클라우드에서 VM 무료 용량이 얼마인지 명확하게 명시해놓은곳이 없어서 직접 최대치로 한번 생성해봤습니다. 현재 날짜 기준입니다. VM 은 최대 2개까지인데 VM 1개의 부트 볼륨 최대 용량은 200GB 입니다. 오라클 클라우드 VM 부트 볼륨 무료 최대 용량 그리고 블록스토리지 무료 최대 용량입니다. 오라클 클라우드 블록스토리지 무료 최대 용량 이것도 2개까지인데 하나당 100GB까지가 무료 최대 용량인것 같습니다….
[CentOS] 오라클 클라우드 VM 루트 볼륨 확장 방법
오라클 클라우드 VM 에서 OS를 CentOS 7.9로 부트 볼륨을 무료 최대 용량인 200GB 로 설정하고 만들었습니다. 그런데 확인해보면 200G까지 확인이 되어있지 않고 디폴트 용량인 50GB 로 셋팅되어 있네요~ VM 을 생성할때 실제 os설치가 아닌 복제 방식이라서 그런가봅니다. [root@itrooms ~]# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 459M 0 459M 0% /dev tmpfs…