/
Serving Web pages from QRISCloud Servers

Serving Web pages from QRISCloud Servers

Introduction

Installation

Register the domain

You will need to register your domain by purchasing a domain name from the likes of https://www.crazydomains.com.au/ etc. When registering, can you register dns1.griffith.edu.au anddns3.griffith.edu.au as the primary DNS name servers. Then we can log a service desk case at Griffith to point the name to the correct IP address. Here is the procedure:

Let’s say you have registered a domain called example.org.au

Get the IP address of the server hosting this website. Let’s say it is: 103.131.227.107

Then go to the service desktop tool: https://griffith.service-now.com/

Log in. Go to "service request" ==> “Create new” ==> Fill in the following:

Requester : yourself
Affected end user: yourself
ITL Process: Request
Category: Network (Plain network would do)
Summary: Point example.org.au to IP 103.131.227.107 in the dns servers
Description: (Give a description of the problem. see below for example):
We would like to use Griffith DNS servers as the primary dns servers for domain example.org.au. Can you please point example.org.au to IP 103.131.227.107.

Save and Exit

That's it.

Web server installation

yum install httpd
sudo systemctl enable httpd.service
yum install mod_ssl
#create the keys
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/pki/tls/private/apache.key -out /etc/pki/tls/certs/apache.crt

#The options are explained below
#-out: This tells OpenSSL where to place the certificate that we are creating.
#-keyout: This line tells OpenSSL where to place the generated private key file that we are creating.

Go to the section  <VirtualHost _default_:443>
Change this to:
DocumentRoot "/var/www/example.org.au/public_html"
ServerName www.example.org.au:443

SSLCertificateFile /etc/pki/tls/certs/apache.crt

SSLCertificateKeyFile /etc/pki/tls/private/apache.key


mkdir /etc/httpd/sites-available
mkdir /etc/httpd/sites-enabled

vi /etc/httpd/sites-available/example.org.au.conf

>>>>>>>
<VirtualHost *:80>
    ServerName www.example.org.au
    ServerAlias example.org.au
    DocumentRoot /var/www/example.org.au/public_html
    ErrorLog /var/www/example.org.au/error.log
    CustomLog /var/www/example.org.au/requests.log combined
    RewriteEngine on
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
</VirtualHost>

>>>>>>>>
ln -s /etc/httpd/sites-available/example.org.au.conf /etc/httpd/sites-enabled/example.org.au.conf

vi /etc/httpd/conf/httpd.conf
NameVirtualHost *:80
IncludeOptional sites-enabled/*.conf


>>>>>>>>

touch /var/www/example.org.au/error.log
touch /var/www/example.org.au/requests.log
chcon --reference /var/log/httpd/error_log /var/www/example.org.au/error.log
chcon --reference /var/log/httpd/access_log /var/www/example.org.au/requests.log
>>>>>>


sudo apachectl restart




Reference

Related content

QRIScloud-Queensland Server Additional Configuration
QRIScloud-Queensland Server Additional Configuration
More like this
Griffith Cloud Home
Griffith Cloud Home
More like this
Request a Server on QRIScloud
Request a Server on QRIScloud
More like this
Using VPN Client on QRIScloud to Access Institutional Resources
Using VPN Client on QRIScloud to Access Institutional Resources
More like this
QRIScloud Support
QRIScloud Support
More like this
QRISCloud Virtual Machine Configuration
QRISCloud Virtual Machine Configuration
More like this