-1

I am not a server guy and trying to configure a redhat linux virtual machine on azure for hosting a php website. While creating the VM I got a public IP and option to save a name for the DNS, which I saved. When trying to access that url http://omgchicks.southeastasia.cloudapp.azure.com/ I get nothing.

Upon further researching I came to conclusion that some inbound rules has to be applied like we used to create end points in classic mode. Which I did. Currently I allowed all the ports. Still I get nothing when I hit that IP.

I have already installed apache , php on the VM which I am able to access through PUTTY.

I know nothing from here. What are the steps to get this working?

1
  • You really need to edit your question and show how you set up your inbound security rules. This question has been asked numerous times here, and it's usually related to how the rules were created (or the firewall on the vm). Feb 26, 2016 at 12:51

1 Answer 1

0

ANSWER Following are the steps that worked for me. For those who have created Redhat enterprise 7.2 VM on azure and are new to linux can have a tough time configuring everything.

  1. First I created a new VM using the classic mode, I don't know why Resource Manager mode doesn't work. Will update the answer when I find a solution.
  2. Add 3 Endpoints for the VM for port 80,8080(for http) and 3306(for sql)
  3. Adding just endpoints is not enough. You will have to open the port on linux firewall as well

    firewall-cmd --zone=public --add-port=80/tcp --permanent firewall-cmd --reload iptables-save | grep 80 Do repeat all 3 steps for other ports too.

  4. Now install apache

    yum install httpd

  5. Install php and other required libs

    yum install php php-mysql

  6. Now install mysql-server. There is a catch in this step. If you install this using "yum install mysql-server" , it will install the mariadb on redhat 7.2 but you will not be able to access or start the service(reasons I am still trying to figure out) so use the following command.

    yum install mariadb-server mariadb

  7. Now start the apache and mysql-server

    service httpd restart

    service mariadb restart

  8. Try uploading a .php file and accessing it. You will get it rendered in the browser.

you can still have a read/write permission issue. Try this

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .