Document directory
I encountered some problems when trying to install a DNN website on a server.
Question 1:
The first problem is that the website is always automatically directed to localhost. No matter how I try it, just enter the token.
Solution:
- This problem is easy to solve:
- Use host to log on
- Go to Admin-> Site Setting Page
- In the Portal Alias (website Alias) settings, add a new Http Alias "domain.com/dnn"
When the website uses the default port 80, this setting can solve the problem.
Question 2:
When I want to run this DNN website on port 8080, such as http://domain.com: 8080/dnn, the port number in the URL disappears if I click a link and want to go to another page, such as http://domain.com: 8080/will automatically become http://domain.com/
Solution:
After Google, I carefully read the web. config file and found it clearly indicated in the web. config file: <! -- Set UsePortNumber to true to preserve the port number if you're using a port number other than 80 (the standard)
<Add key = "UsePortNumber" value = "true"/> -->
I modified the ettings section and added the following line: <Add key = "UsePortNumber" value = "true"/>
At the same time, I added a new Http alias "domain.com: 8080"
After this modification, the port number will not be automatically dropped in the form of http: // localhost: 8080, either in the form of http://domain.com: 8080, or in the form of a http://domain.coom
Note: Later I found that this is not a problem with DNN, but a problem with router settings and port forwarding. This will be discussed later.
Question 3:
After adding the "UsePortNumber" setting, it does not solve my problem.
Solution:
For the machines that install DNN, the router settings will forward the data to port 8080 to port 80. So when I access http://domain.com: 8080, the URL obtained by the DNN Request object is actually a http://domain.com, and when DNN does URL rewrite, It is processing htpp: // domain.com.
This is a big problem for me. At first I wanted to write a 404 Page not found HttpHandler to solve the problem, but soon I realized that this event could not be triggered at all. Then I want to modify the handlers of DNN to solve this problem. Finally, I fixed the problem by modifying the IIS and Router settings.
- In IIS, I set the default site (the site where DNN is located) to use port 8080.
- In vro settings, the forwarding of port 8080 is changed from 80 to 8080 (actually, no forwarding is performed)
- Make sure that "domain.com: 8080/DNN" is added to the Http alias of dnn ".
All the problems have been solved.
Address: http://geekswithblogs.net/shahed/archive/2008/02/19/119788.aspx