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.
Getting started with Microsoft Azure Free Tier
Step 1
Search for Microsoft Azure Free Tier
Video Tutorial
Step 2
Hit the Start Free button
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.
Step 4
Launch the dashboard
Step 5
You will find all of the Azure services. We are going to set up Virtual machines
Step 6
Create a virtual machine.
Step 7
Submit the Virtual machine details and choose the region.
Step 8
Create a group name for reference.
Step 9
Select a Virtual Machine size. I would recommend using the small instance.
Step 10
Choose the operating system and click next.
Step 11
Create user credentials for connecting the VM instance. Enable port rules for HTTP, HTTPs and SSL.
Step 12
Now choose the disk type.
Step 13
Click on the Public IP -> Create New link
Step 14
Change the public IP to static. Or else the public IP is a dynamic one.
Step 15
Under Management make sure the options should match with the following screenshot for a free trail
Step 16
Add extensions if you want.
Step 17
Add a tag for the VM instance.
Step 18
Verify the pricing details.
Step 19
Now hit the Create button.
Step 20
Microsoft Azure Virtual Machine got created.
Firewall Settings for Security Rules
Step 21
You will find the VM instance details.
Step 22
You can add other ports by adding under Inbound port rules.
Step 23
Add a security rule.
Connecting the Virutl Machine
Step 24
Now connect your VM instance. Go to terminal and use the command $ssh username@IP-ADDRESS
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
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
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.
Step 27
Hit the public IP address.
Step 28
You will find the XAMPP default page.
XAMPP Access Forbidden
Open your browser and access http://IP-ADDRESS/ you will find this Access forbidden screen.
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>
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.
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/
Domain Settings
If you own a domain address, go to domain DNS(Domain name settings). Add host value @ points to IP-Address
0 comments: