Microsoft Azure Virtual Machines Setup with Ubuntu and XAMPP PHP Server
Wall Script
Wall Script
Tuesday, August 06, 2019

Microsoft Azure Virtual Machines Setup with Ubuntu and XAMPP PHP Server

Microsoft Azure is another great alternate cloud service and it is offering a one-year free trial with $200 credit. This post is almost similar to my previous Cloud service article. This will explain to you how to set up a virtual machine instance with secure firewall rules and setting up a XAMPP(PHP Maria DB Server) using the Ubuntu operating system. Microsoft Azure has lots of free project management services. This is very useful for your side projects.

Google Cloud VM Instance Setup with Ubuntu and XAMPP PHP Server



Getting started with Microsoft Azure Free Tier

Step 1
Search for Microsoft Azure Free Tier
Google Cloud Free Tier

Video Tutorial


Step 2
Hit the Start Free button
Google Cloud Free Trial

Step 3
Make sure to verify the $200 credit. Create an account and give valid credit or debit information. They would not charge until the trial period ends. 
Google Cloud Free Trial

Step 4
Launch the  dashboard
Google Cloud Free Trial

Step 5
You will find all of the Azure services. We are going to set up Virtual machines 
Google Cloud Free Trial


Step 6
Create a virtual machine.
Google Cloud Free Trial

Step 7
Submit the Virtual machine details and choose the region.
Google Cloud Free Trial

Step 8
Create a group name for reference.
Google Cloud Free Trial

Step 9
Select a Virtual Machine size. I would recommend using the small instance.
Google Cloud Free Trial

Step 10
Choose the operating system and click next.
Google Cloud Free Trial

Step 11
Create user credentials for connecting the VM instance. Enable port rules for HTTP, HTTPs and SSL
Google Cloud Free Trial

Step 12
Now choose the disk type.
Google Cloud Free Trial

Step 13
Click on the Public IP -> Create New link
Google Cloud Free Trial

Step 14
Change the public IP to static. Or else the public IP is a dynamic one.
Google Cloud Free Trial


Step 15
Under Management make sure the options should match with the following screenshot for a free trail
Google Cloud Free Trial

Step 16
Add extensions if you want.
Google Cloud Free Trial

Step 17
Add a tag for the VM instance.
Google Cloud Free Trial

Step 18
Verify the pricing details.
Google Cloud Free Trial

Step 19
Now hit the Create button.
Google Cloud Free Trial

Step 20
Microsoft Azure Virtual Machine got created.
Google Cloud Free Trial

Firewall Settings for Security Rules

Step 21
You will find the VM instance details.
Google Cloud Free Trial

Step 22
You can add other ports by adding under Inbound port rules.
Google Cloud Free Trial

Step 23
Add a security rule.
Google Cloud Free Trial

Connecting the Virutl Machine

Step 24
Now connect your VM instance. Go to terminal and use the command $ssh username@IP-ADDRESS
Google Cloud Free Trial


XAMPP Installation Commands for Ubuntu


Download XAMPP for 64 bit
wget https://www.apachefriends.org/xampp-files/7.0.23/xampp-linux-x64-7.0.23-0-installer.run

Step 25
Now download the XAMPP packager
Google Cloud Free Trial

Make Execute Installation
sudo chmod +x xampp-linux-x64-7.0.23-0-installer.run

Run Installation
sudo ./xampp-linux-x64-7.0.23-0-installer.run


XAMPP instructions
Select the components you want to install; clear the components you do not want to install. Click Next when you are ready to continue.
XAMPP Core Files : Y (Cannot be edited)
XAMPP Developer Files [Y/n] : Y
Is the selection above correct? [Y/n]: Y

Installation Directory
XAMPP will be installed to /opt/lampp
Press [Enter] to continue:
Do you want to continue? [Y/n]:Y

Run XAMPP
sudo /opt/lampp/lampp start

Step 26
Now start the XAMPP server.
Google Cloud Free Trial

Step 27
Hit the public IP address.
Google Cloud Free Trial


Step 28
You will find the XAMPP default page.
Google Cloud Free Trial

XAMPP Access Forbidden
Open your browser and access http://IP-ADDRESS/ you will find this Access forbidden screen.
Launch instance

XAMPP Configurations
Edit XAMPP configurations.
vi /opt/lampp/etc/extra/httpd-xampp.conf

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

to

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Allow from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

Restart XAMPP
sudo /opt/lampp/lampp restart

Security Settings
sudo /opt/lampp/xampp security

XAMPP: Your XAMPP pages are NOT secured by a password.
XAMPP: Do you want to set a password? [yes]
XAMPP: Your XAMPP pages are NOT secured by a password.
XAMPP: Do you want to set a password? [yes] no
XAMPP: MySQL is accessable via network.
XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] yes
XAMPP: Turned off.
XAMPP: Stopping MySQL...ok.
XAMPP: Starting MySQL...ok.
XAMPP: The MySQL/phpMyAdmin user pma has no password set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Password:*******
XAMPP: Password (again):*******
XAMPP: Setting new MySQL pma password.
XAMPP: Setting phpMyAdmin's pma password to the new one.
XAMPP: MySQL has no root passwort set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Write the password somewhere down to make sure you won't forget it!!!
XAMPP: Password:*******
XAMPP: Password (again):*******
XAMPP: Setting new MySQL root password.
XAMPP: Change phpMyAdmin's authentication method.
XAMPP: The FTP password for user 'daemon' is still set to 'xampp'.
XAMPP: Do you want to change the password? [yes] no
XAMPP: Done.

PhpMyAdmin
Access PhyMyAdmin at http://IP-Address/phpmyadmin/
Launch instance

Domain Settings
If you own a domain address, go to domain DNS(Domain name settings). Add host value @ points to IP-Address
Launch instance
web notification

0 comments:

mailxengine Youtueb channel
Make in India
X