Setting Up EC2 Web Server

Getting X11 Forwarding Working

It can be confusing to see the report {code}WARNING! The remote SSH server rejected X11 forwarding request.{/code}. You’ve made sure that {bash}/etc/ssh/sshd_config{/bash} has X11 forwarding enabled and that a local X Server is running. The problem is that many servers do not have {bash}xauth{/bash} installed by default. Adding this enables X11 forwarding.

LAMP

Firewall

Before connecting to the web server, you will need to allow HTTP to pass through the firewall. The easiest way is to use {bash}system-config-firewall{/bash}. As I frequently have difficulty getting the text versions of the {bash}system-config-*{/bash} to run, I use the graphical version.

MySQL

After setting up MySQL, you need to add a database:

PHP

Before the PHP installation will work, you need to enable some package repositories that are disabled by default. This is needed because {bash}php-mcrypt{/bash} is not available in the repositories enabled by default.

Miscellaneous

You need to “activate” the EPEL repository before installing phpMyAdmin, which can be found at {bash}/etc/yum.repos.d/epel.repo{/bash}.

Quick ‘n Easy LAMP Install on Red Hat/CentOS
Virtual Host Example Configurations
An In-Depth Discussion of Virtual Host Matching
Running Apache2 hosts as different users
Run Apache2 Virtual Hosts as Different Users

Setting up HTTPS

Self-Signing a Certificate for SSL
Generating the Keys
Apache SSL on Red Hat

Allow Access to a Directory Only Via SSH
Password Protect Directories with Basic Authenication

Leave a Reply