Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Add hints how to use frontend webserver #3

Open
SteveClement opened this issue Jun 13, 2024 · 2 comments
Open

[doc] Add hints how to use frontend webserver #3

SteveClement opened this issue Jun 13, 2024 · 2 comments

Comments

@SteveClement
Copy link
Owner

No description provided.

@SteveClement
Copy link
Owner Author

Apache/nginx rewrite to custom port of server runinng locally.

@SteveClement
Copy link
Owner Author

SteveClement commented Jun 25, 2024

<VirtualHost *:80>
    ServerAdmin www@localhost.lu
    # non-existen
    DocumentRoot /var/www/www.localhost.lu
    ServerName ip.localhost.lu
    ServerAlias ipv4.localhost.lu ipv6.localhost.lu whatismyipv6.localhost.lu whatsmyipv6.localhost.lu whatsmyip.localhost.lu whatismyip.localhost.lu whatsmyipv4.localhost.lu whatismyipv4.localhost.lu
    ErrorLog /var/log/apache2/ip.localhost.lu-error_log
    CustomLog /var/log/apache2/ip.localhost.lu-access_log combined
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =ip.localhost.lu [OR]
    RewriteCond %{SERVER_NAME} =ipv4.localhost.lu [OR]
    RewriteCond %{SERVER_NAME} =ipv6.localhost.lu [OR]
    RewriteCond %{SERVER_NAME} =whatsmyip.localhost.lu [OR]
    RewriteCond %{SERVER_NAME} =whatismyip.localhost.lu [OR]
    RewriteCond %{SERVER_NAME} =whatismyipv6.localhost.lu [OR]
    RewriteCond %{SERVER_NAME} =whatsmyipv6.localhost.lu [OR]
    RewriteCond %{SERVER_NAME} =whatsmyipv4.localhost.lu [OR]
    RewriteCond %{SERVER_NAME} =whatismyipv4.localhost.lu [OR]
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:443>
    <Directory />
        Options -Indexes
    </Directory>
    ServerAdmin www@localhost.lu
    # index.html empty
    DocumentRoot /var/www/default-ok
    ServerName ip.localhost.lu
    ServerAlias ipv4.localhost.lu ipv6.localhost.lu whatismyipv6.localhost.lu whatsmyipv6.localhost.lu whatsmyip.localhost.lu whatismyip.localhost.lu whatsmyipv4.localhost.lu whatismyipv4.localhost.lu
    ErrorLog /var/log/apache2/ip.localhost.lu-error_log
    CustomLog /var/log/apache2/ip.localhost.lu-access_log combined
    ProxyRequests Off
    RewriteEngine On
    # Local mmdb-server
    RewriteRule ^/(.*)$ http://127.0.0.1:8111/$1 [P,QSA,L]
    ProxyPassReverse / http://127.0.0.1:8111/

    Header always add Strict-Transport-Security "max-age=15768000"
    #SSLProtocol All -SSLv2 -SSLv3
    RewriteEngine On

    SSLEngine on

    SSLCertificateFile    /etc/ssl/pub/2024/all_certs.localhost.lu.crt
    SSLCertificateKeyFile /etc/ssl/pub/2024/joker.localhost.lu.key
    SSLCertificateChainFile /etc/ssl/pub/2024/int-cert.crt
    <FilesMatch "\.(cgi|shtml|phtml|php)$">
            SSLOptions +StdEnvVars
    </FilesMatch>
    <Directory /usr/lib/cgi-bin>
            SSLOptions +StdEnvVars
    </Directory>
    BrowserMatch "MSIE [2-6]" \
    nokeepalive ssl-unclean-shutdown \
    downgrade-1.0 force-response-1.0
    # MSIE 7 and newer should be able to use keepalive
    BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

    ErrorDocument 404 /404/

</VirtualHost>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant