Linux network server architecture

zhaozj2021-02-16  47

/ * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------

Written in front:

I have seen many netizens' questions about the server configuration, build a reliable and secure application development server is the basis of web programming, especially for friends who have developed JSP on Linux.

This document is the crystallization of my multi-year server configuration. I haven't been modified by my N before publishing (the last big revision is just released in RH7.2, and then because I have not found a mistake because I didn't find any mistakes, I didn't have it. Upgrade), documentation

Reprinted by Tianji Network at the end of 2001 (

Http://www.yesky.com/200206/217592.shtml), after linuxbye.net, CNJsp.COM is reproduced, after the time test, it has not been discovered, and you have not found it.

safe to use.

Documentation is not ideal in the web page, if you want to get PDF of this document, or have any comments, you can mail

Roczhao@msn.com

The document is longer, divided into more articles, this is the eighth article, the following is the text:

-------------------------------------------------- --------------------- * /

Example 4: Test PHP

1 Create a source file

Touch /Home/www/test.php

CHMOD 701 /HOME/www/test.php

2 Edit the source file

Vi Test.php

## The source code is as follows:

PHPINFO ();

?>

3 Test the program

Lynx http://www.yesgo.loc/test.php

/ / The result is a list of known server-side variables.

-------------------------------------------------- ------------------------------------------

Step 17 Configuration Debug

## The possible mistakes of the debugging process are as follows:

Frequently wrong one: you don't have permission

Forbidden

You don't have permission to access / on this server.

Apache / 1.3.22 Server AT

Www.yesgo.loc

Port

80

reasons may be:

1, you didn't set the guest group permissions for this directory or the file;

2, you didn't set this file name as the default page, especially in the case of only domain name access.

Solution:

CHMOD 701 / HOME / WWW

CHMOD 701 / HOME / WWW / *

vi /usr/local/apache/conf/httpd.conf

DirectoryIndex index.html index.jsp index.xtp index.php index.php3

Common Error 2: 404 Not Found

404 NOT Found / INDEX.JSP WAS NOT Found On this Server.

RESIN 2.0.5 (Built THU NOV 15

17:56:24 PST

2001)

reasons may be:

1. You request the file name to enter an error;

2, you didn't build the corresponding host in resin.conf and httpd.conf.

Solution:

1. Check the file name, especially pay attention to the case;

2. Refer to the configuration supporting the JSP virtual host section in the RESIN Install step. Common error three: java.lang.classNotFoundException

500 Servlet Exception

Java.lang.classNotFoundException: org.gjt.mm.mysql.driver

At com.caucho.util.dynamicclassloader.loadclass (DynamicclassLoader.java: 479)

At java.lang.classloader.loadclass (ClassLoader.java: 253)

At java.lang.classloader.loadclassinternal (ClassLoader.java: 313)

At java.lang.class.forname0 (Native Method)

At java.lang.class.Forname (Class.java: 120)

AT _CNMYSQL__Jsp._JspService (/cnmysql.jsp:4)

At com.caucho.jsp.javapage.service (javapage.java: 74)

At com.caucho.jsp.page.subservice (page.java: 485)

At com.caucho.ser.http.filterchainPage.dofilter (FilterchainPage.java: 176)

At com.caucho.ser.http.invocation.service (Invocation.java: 278)

At com.caucho.ser.http.cacheinvocation.service (cacheinvocation.java: 129)

At com.caucho.server.http.RunnerRequest.HandleRequest (runnerRequest.java: 338)

At com.caucho.server.http.runnerRequest.handleconnection (runnerRequest.java: 270)

At com.caucho.ser.tcpConnection.run (tcpConnection.java: 140)

AT java.lang.thread.run (thread.java: 484)

RESIN 2.0.5 (Built THU NOV 15

17:56:24 PST

2001)

reasons may be:

1, you don't have drivers installed;

2, the driver is not set to the system classpath.

Solution:

See classes install and edit / etc / profile

Common error four: Invalid Authorization Specification

500 Servlet Exception

Java.sql.sqlexception: Invalid Authorization Specification: Access Denied

For User: 'hongze@ns.langkey.loc' (Using Password: YES)

At Org.gjt.mm.mysql.mysqlio.init (mysqlio.java: 330)

At Org.gjt.mm.mysql.connection.connectioninit (connection.java: 261)

At Org.gjt.mm.mysql.jdbc2.connection.connectioninit (connection.java: 89)

At Org.gjt.mm.mysql.driver.connect (driver.java: 167)

At java.sql.drivermanager.getconnection (drivermanager.java: 517) at java.sql.driverManager.getConnection (drivermanager.java: 177)

AT _CNMYSQL__Jsp._JspService (/cnmysql.jsp: 5)

At com.caucho.jsp.javapage.service (javapage.java: 74)

At com.caucho.jsp.page.subservice (page.java: 485)

At com.caucho.ser.http.filterchainPage.dofilter (FilterchainPage.java: 176)

At com.caucho.ser.http.invocation.service (Invocation.java: 278)

At com.caucho.ser.http.cacheinvocation.service (cacheinvocation.java: 129)

At com.caucho.server.http.RunnerRequest.HandleRequest (runnerRequest.java: 338)

At com.caucho.server.http.runnerRequest.handleconnection (runnerRequest.java: 270)

At com.caucho.ser.tcpConnection.run (tcpConnection.java: 140)

AT java.lang.thread.run (thread.java: 484)

RESIN 2.0.5 (Built THU NOV 15

17:56:24 PST

2001)

reasons may be:

1. The host name, database name, account or password in the source code is incorrect;

2. If the database name, account number, password is correct, that is the description is that the host name does not match;

3. If you use a data source library, check if the data source settings and the name of the source code are entered correct.

Solution:

1. See RESIN INSTALL and Server Test;

Note: The database connection is not just the account and password, but is determined by the host name, database name, username, and password.

转载请注明原文地址:https://www.9cbs.com/read-23314.html

New Post(0)