LAMP to build common problems

Linux FAQ built on LAMP

common problem

1. Direct your browser to see the source code files / or a blank page when accessing xxx.php page

The reason: php package not equipped
to resolve: to ensure that the php package installation is complete, restart the httpd service

2. With regard to service control, service name after automatic filled with .service, reservation does not affect the use of

Cause: The name suffix system service default .service
solve: both are the same, does not affect

3. physical machine was rejected from the web browser to access the virtual machine

The reason: No Network, IP address configuration errors, httpd service is not open, not closed the firewall
Solution: Check the above configuration is correct, to view the current status of the firewall and service httpd

4 is rejected by Xshell upload page to / var / www / html

The reason: lack of authority
to resolve: permission to modify / change user permissions

5. Code feedback about the website visit

404 Not Found Page Not Found
403 Forbidden ban
500 Internal Error Internal server error

Prompt access http://127.0.0.1 6. Browser "Unable to connect

The reason: httpd service is not started / failed to start
Solution: open service httpd

7. Start httpd service fails with a message as follows:

ob for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details

The reason: just modify the contents of the configuration errors
resolved: the implementation of the error condition httpd -t check the configuration, according to the troubleshooting tips

8. Access http://xx.cn from the page to see the real machine is not your own page

The reason: the real machine to learn the target domain name through DNS IP address
Solution: a browser to access a virtual machine from the machine

9. tts8 access from the browser's native virtual machine, ne when the page is displayed Testing ... 123 \

Cause: The name is not a test page index.html, or web directory permissions have a problem
to solve: Use the correct home page name, as far as possible into the web directory / var / www / under

10. Access to see the same domain name settings page

Cause: The name of the virtual host configuration file does not begin within the end .conf, or vhosts.conf file settings specified site name ServerName wrong, or / etc / hosts in the domain name is wrong
Solution: Check whether misconfigured

11.httpd service failed to start

Cause: The configuration file is incorrect or the page does not exist
to address: http -t perform checks syntax errors, follow the prompts Correction

In the case of correct operation of the display when accessing domain name and build a good forum and other services Testing123 ...

The reason: It may be related to DNS resolution
solution is as follows:

[root@server7 ~] vim /etc/httpd/conf.d/vhosts.conf 
[root@server7 ~] mv /etc/httpd/conf.d/vhosts.conf /root/
[root@server7 ~] systemctl restart httpd
[root@server7 ~] firefox http://127.0.0.1
[root@server7 ~] mv /root/vhosts.conf /etc/httpd/conf.d/
[root@server7 ~] systemctl restart httpd
[root@server7 ~] firefox http://bbs.xxoo.cn

Specific further modified depending on their file path and name of the
pro tested this method is feasible both sides

Reproduced in: https: //blog.51cto.com/14309999/2402370

Guess you like

Origin blog.csdn.net/weixin_34220623/article/details/92256065