Como configurar o apache2.conf no Ubuntu 16.04 para que a mensagem de erro não seja armazenada em cache sob o URL da página?

0

Recentemente, eu configurei o /etc/apache2/apache2.conf no Ubuntu Linux 16.04 para que um usuário do navegador da web possa executar o 127.0.0.1/login.aspx com qualquer navegador, desde que nós executemos um servidor mod_mono_server4 e 1 ou mais instância do serviço apache2.

De este artigo :

Consider a web browser which attempts to load a page while the network is unavailable. The browser will receive an error code indicating the problem, and may display this error message to the user in place of the requested page. However, it is incorrect for the browser to place the error message in the page cache, as this would lead it to display the error again when the user tries to load the same page - even after the network is back up. The error message must not be cached under the page's URL; until the browser is able to successfully load the page, whenever the user tries to load the page, the browser must make a new attempt.

A frustrating aspect of negative caches is that the user may put a great effort into troubleshooting the problem, and then after determining and removing the root cause, the error still does not vanish.

Como devo configurar o /etc/apache2/apache2.conf no Ubuntu 16.04 para que a mensagem de erro não seja armazenada em cache sob o URL da página?

Aqui está o meu /etc/apache2/apache2.conf atual no Ubuntu 16.04 ":

DocumentRoot "/home/vendors/DevelopmentX64/My-Web-App/My-Web-App"

ServerName localhost LoadModule mono_module /usr/lib/apache2/modules/mod_mono.so

<Directory /home/vendors/DevelopmentX64/My-Web-App/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted </Directory>

Alias "/" "/home/vendors/DevelopmentX64/My-Web-App/My-Web-App"


AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx .axd MonoApplications "/:/home/vendors/DevelopmentX64/My-Web-App/My-Web-App"

Qualquer ajuda é sinceramente bem-vinda e apreciada.

    
por Frank 06.08.2016 / 14:51

1 resposta

0

Eu usei o recurso AliasMatch do servidor apache para corresponder a uma expressão regular PCRE como $ 1.aspx precedida por DocumentRoot , /home/venkat/DevelopmentX64/HVR-Web-App/HVR-Web-App . Aqui estão minhas alterações para /etc/apache2/httpd.conf ou apache2.conf

AliasMatch \.(aspx|jpg|gif|png)$  /home/venkat/DevelopmentX64/HVR-Web-App/HVR-Web-App$1.aspx

MonoDebug true
MonoAutoApplication disabled
AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx .axd
MonoApplications "/:/home/venkat/DevelopmentX64/HVR-Web-App/HVR-Web-App"
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers       4
MinSpareServers    3
MaxSpareServers   10
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  10000
</IfModule>
    
por 08.08.2016 / 07:42