Lab 1 Important concepts

SSH

Login to UQCloud through SSH: (using PuTTY)

locate hostname

infs3202-xxxxx.zones.eait.uq.edu.au

Through Powershell:

ssh studentusername@infs3202-yourcode.zones.eait.uq.edu.au

Connection type SSH

File Management on the UQCloud zone

File Transfer Protocol (FTP)

Secure File Transfer Protocol (SFTP)

The UQCloud zone webserver employs SFTP as its data transfer protocol. Therefore, in order to manage files on the UQzone, either FileZilla or WinSCP can be used.

Nginx

Configuration file

Can use nano as in-terminal text editor:

nano /etc/nginx/sites-enabled/https-site
http {
    server {
        listen 80; # Listen on port 80 for HTTP requests
        server_name example.com; # Replace with your domain name or use localhost

        # Document root where the files are located
        root /var/www/html/htdocs;

        # Default file to serve
        index index.html index.htm;

        # Serve files
        location / {
            try_files $uri $uri/ =404;
        }
    }
}

Serving files with Nginx

By placing an HTML file in the htdocs folder (or the specified root directory), you can view it by navigating to the corresponding URL. If you create a file named index.html within that directory, it would be served as the default page when accessing the root URL of your server.

also included this:

location /resumebuilder {
    alias /var/www/resumebuilder/public/;
    try_files $uri $uri/ @resumebuilder;

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $request_filename;
    }
}

location @resumebuilder {
    rewrite /resumebuilder/(.*)$ /resumebuilder/index.php?/$1 last;
}

Important linux commands

ssh:

Example

ssh studentusername@infs3202-yourcode.zones.eait.uq.edu.au

nano:

nano /etc/nginx/sites-enabled/https-site

sudo

sudo systemctl start code-server@USERNAME

curl

curl http://example.com

chmod

sudo chmod -R 777 /var/www/resumebuilder

cd

cd <directory>

mv

mv [options(s)] [source_file_name(s)] [Destination_file_name or destination file path]