How is a website published and hosted on the internet?

Asked

Viewed 63 times

-4

My question is how a site made with PHP and Mysql is published on the internet? And how is it hosted on an online server?

  • 1

    Don’t you have mysql connection settings in your php files? localhost etc... Just switch to the hosting server, don’t you have the files organized in your localhost folders? Just put in the hosting server folder...

  • I understand, and a website as a news portal, how it is updated in every news on the hosting server? Would be another question that?

  • 1

    Related: https://answall.com/q/167437/18246

1 answer

1


A web server is roughly a machine with an operating system, a web server software (in the case of php or Apache), a database server software and an application software, the site, with its front-end(html,js) and back-end(php).

A fixed ip is assigned to that machine, a DNS server is responsible for translating the domain(www.exemplo.com.br) to the corresponding ip (33.155.109.105).

From the moment the ip is assigned to the server that in turn has a port set to stay full time awaiting requests, the site is in the air being accessed by ip (http://33.155.109.105) or by the configured domain (http://www.exemplo.com).

When a request is made ex: http://www.exemplo.com/uma_página.php, the server will search your root folder for the file uma_página.php, which in turn will display the result of its processing as a response to the request.

Your question is wide, so it is not usual to have generic answers like this, which aims to encourage you to research the minutiae of how this works here on the site, there are very good answers.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.