php - Can anyone help me with my questions about filing Apache configuration?
滿天的星座
滿天的星座 2017-06-13 09:22:05
0
3
934

1. Can unregistered domain names be resolved and used normally?
2. Is access to port 80 of the public network allowed if it is not registered?
3. Why are there many photo websites on the Internet that are legal and can be registered even if they don’t reveal their website at three o’clock?
4. I have never configured an online project myself, but the answers on the Internet are all the same, and it is difficult to filter out useful information.
Please give some accurate guidance.
After setting up the lamp environment with yum on the cloud server, apache2.4 php5.6
For example, if my project is placed under /var/www/html,
use port 80 or 8080, at this time my The public IP already exists, do I still need a virtual host?
After I configure iptables and open ports 22 80 8080 3306 and so on,
configure it in /etc/httpd/conf/httpd.conf

ServerName xxx.xxx.xx.xxx:8080
listen 8080
<VirtualHost xxx.xxx.xx.xxx:8080>
    #ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "/var/www/html"
    ServerName xxx.xxx.xx.xxx:8080
    #ErrorLog logs/dummy-host.example.com-error_log
    #CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

What's wrong with this?
How should I do online configuration? Please give me some advice! Grateful! !

滿天的星座
滿天的星座

reply all(3)
phpcn_u1582

Thanks for the invitation~ I have never set up an environment on a cloud server, but I can answer the first few points of the question

  1. Unregistered domain names can be used, but they must be on overseas servers. Domestic servers, if you want to use domain name to access, must register

  2. After applying for a server, port 80 is open by default and can be accessed. If it is not open, just open it manually and access it directly using IP. The default port is 80

  3. (I’m not sure what you’re describing here, so I can’t answer it accurately)

  4. The answers on the Internet are all the same, but if you read more, you will find that some articles (the content is not copy and paste) have some similarities, then these similarities may be useful information. There is no one to give advice, isn’t it all done by Baidu and Google

Traditional server, configure online environment:

  1. Domain name is resolved to IP

  2. Domain name registration

  3. Server configuration (This is not a cloud server, the specific operation method will not be introduced, and it will not be helpful to you)

By the way, if the port you are monitoring is not port 80, then you must add the port number when accessing using domain name/IP

伊谢尔伦

Those who have not registered will definitely not be accepted and will be blocked

我想大声告诉你

Domestic servers that have not been registered will block you and prevent you from accessing. . . The virtual host does not need to be configured. There is a default one. It will be there by default. If the virtual host is not enabled, configure it directly in httpd.conf

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template