Linux configuration domain name solution-php Tutorial

Source: Internet
Author: User
Tags alicloud
I have installed php + nginx + mysql on linux.
Then write index. php in the www directory and enter File.
However, when you enter a domain name in the browser, the following error occurs:

Then find the information. I configured this in vi/etc/hosts.

Then the access still fails.

My domain name is also configured as above
I entered curl x.woyaoni.cn in linux.
I ping x.woyaoni.cn on windows and the result is OK!

Excuse me, how can I access AliCloud in a browser... Solution! Excuse me, how can I access AliCloud in a browser... Solution!
Excuse me, how can I access AliCloud in a browser... Solution! Excuse me, how can I access AliCloud in a browser... Solution!
Excuse me, how can I access AliCloud in a browser... Solution! Excuse me, how can I access AliCloud in a browser... Solution!


Reply to discussion (solution)

View the configuration in the nginx. conf file

View the configuration in the nginx. conf file


How to configure it.

Server {
# Listening to port 80
Listen 80;
# Define access using www.xx.com
Server_name www.xx.com;

# Set access logs for the current virtual host
Access_log logs/www.xx.com. access. log main;

# Default request
Location /{
Root/root; # define the default website root directory location of the server
Index. php index.html index.htm; # define the name of the home index file

Fastcgi_pass www.xx.com;
Fastcgi_param SCRIPT_FILENAME $ document_root/$ fastcgi_script_name;
Include/etc/nginx/fastcgi_params;
}


For more information, see workshop.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.