우선 아파치의 기본 서버 실행 경로는 /var/www/html 으로 설정되어있다. 그러던 중 해당 경로가 아닌 다른 경로로 서버를 돌리고자 하는 도중에 문제가 발생했다. 해당 주소로 접속하면 원하는 주소가 아닌 403 Forbidden 에러가 발생하며 권한이 없다고 한다.구성한 설정은 다음과 같다.1.sudo vi /etc/httpd/conf/httpd.confDocumentRoot /home/ec2-user/test Options Indexes FollowSymLinks AllowOverride None Require all granted2.apachectl -t3.sudo systemctl restart httpd4.echo "" > test/index.php해당 아이피로 접속하자 다..
데이터를 한글로 저장하려는 순간 다음 에러가 발생하였다. 영어로 저장할 때는 저장이 되다가 발생한 문제였기에 DB나 SpringBoot에서 CharacterSet에 대한 설정을 안해줘서 발생한 문제로 보인다.java.sql.SQLSyntaxErrorException: (conn=3031) Incorrect string value: '\xEC\x95\x84\xEC\x95\x84...' for column 'content' at row 1맨 아래에 해당 텍스트를 추가한다.1.vi /etc/my.cnf[client]default-character-set = utf8mb4[mysql]default-character-set = utf8mb4[mysqld]character-set-client-handshake = ..
Apache, php, MySQL 설치1.sudo dnf update -y2. sudo dnf install -y httpd wget php-fpm php-mysqli php-json php php-devel mariadb105-server3. sudo systemctl start httpd4. sudo systemctl enable httpd Apache2 httpd server file의 기본 경로는 /var/www/html으로 기본 값이 설정되어있다. 그리고 해당 경로를 조작하기 위해서는 ec2-user 계정에 권한을 부여해줘야 한다. 왜냐하면 해당 경로는 소유자 root 그룹 root로 구성이 되어있기 때문이다.ec2-user 권한 부여1.sudo usermod -a -G apache ec2-us..
Amazon Linux 2023 기준입니다.1.sudo vim /etc/ssh/sshd_config 62 # Explicitly disable PasswordAuthentication. By presetting it, we 63 # avoid the cloud-init set_passwords module modifying sshd_config and 64 # restarting sshd in the default instance launch configuration. 65 PasswordAuthentication yes 66 PermitEmptyPasswords no 67 68 # Change to no to disable s/key passwords 69 #KbdInteractiveAuthentica..
1.ssh -i test.pem ec2-user@EC2 IP2. curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash3. source ~/.bashrc4. nvm install --lts # 최신 버전이 아닌 버전을 다운받고 싶다면 https://nodejs.org/en/download/package-manager/current 해당 링크에서 자신이 다운받고자 하는 버전을 찾아서 명령어를 실행시키면 된다.5. node -e "console.log('Running Node.js ' + process.version)"6. npm i -g pm27. npm install express8. npm ci9. npm run b..