You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Antonio <an...@vieiro.net> on 2018/12/07 19:52:16 UTC

bits.netbeans.org web server

Hi all,

So we now have a virtual web server for bits.netbeans.org with the
following redirections:

        # Enable rewrite engine
        RewriteEngine On
        # If the requested stuff is not a file ...
        RewriteCond "%{REQUEST_FILENAME}" "!-f"
        # ... nor a directory ...
        RewriteCond "%{REQUEST_FILENAME}" "!-d"
        # ... then redirect (302) to Oracle's server
        RewriteRule "^/var/www/bits.netbeans.org/(.*)$"
"http://137.254.56.27/%{REQUEST_URI}" [L,R=302]
        # As a fallaback also redirect all 404 files
        ErrorDocument 404 http://137.254.56.27%{REQUEST_URI}

(please doublecheck these look fine)

You can test redirections to the previous site as follows:

a) Edit your "/etc/hosts" or "\Windows\System32\services\etc\hosts" (not
sure about the windows one) and add the following entry:

52.6.211.55	bits.netbeans.org

This will make your operating system think that "bits.netbeans.org"
points to "netbeans-vm.apache.org".

Of course you want to remove this entry from your "hosts" file in the
future.

b) Try to load the following urls:

http://bits.netbeans.org/
(sample page, no redirection)

http://bits.netbeans.org/dev/nightly/latest/
(404 page, 302 redirection to Oracle site)



The proposed plan now is:

a) Please send me (again) the URLs of the zip files to add to the web
server. These should come from zip files (javadoc, maven, whatever)
generated by Jenkins in builds.apache.org. We may want to create an
additional "timestamp" file with the date the zip file was built to
avoid downloading unnecessarily (I don't know if build.apache.org
acknowledges file timestamps properly).

b) I'll add a cron job to periodically check timestamp, download if
required, and extract the files in proper places. This may be run each,
say, two hours? four hours? We can also create a web hook, but I'd
rather not run stuff triggered externally.

c) We'll contact infra to make the DNS changes to point
bits.netbeans.org to 52.6.211.55 (no more hacking in your hosts file
required then).

d) We'll request a LetsEncrypt certificate once the DNS records are in
place.

e) We'll set up a secure web server once the certificates are in place.


Is everything ok with the plan? Any problems you can see?


Thanks,
Antonio



Re: bits.netbeans.org web server

Posted by Antonio Vieiro <an...@vieiro.net>.
Yep, that’s step d) we need a), b) and c) first...

El El vie, 7 dic 2018 a las 21:04, Eduardo Quintanilla <
equintanilla@bnext.mx> escribió:

> HTTPS not supported ☹.
>
> Best regards,
> Eduardo Quintanilla
> Software Developer
> Block Networks
>
> -----Original Message-----
> From: Antonio <an...@vieiro.net>
> Sent: viernes, 7 de diciembre de 2018 1:52 p. m.
> To: dev@netbeans.incubator.apache.org
> Subject: bits.netbeans.org web server
>
> Hi all,
>
> So we now have a virtual web server for bits.netbeans.org with the
> following redirections:
>
>         # Enable rewrite engine
>         RewriteEngine On
>         # If the requested stuff is not a file ...
>         RewriteCond "%{REQUEST_FILENAME}" "!-f"
>         # ... nor a directory ...
>         RewriteCond "%{REQUEST_FILENAME}" "!-d"
>         # ... then redirect (302) to Oracle's server
>         RewriteRule "^/var/www/bits.netbeans.org/(.*)$"
> "http://137.254.56.27/%{REQUEST_URI}" [L,R=302]
>         # As a fallaback also redirect all 404 files
>         ErrorDocument 404 http://137.254.56.27%{REQUEST_URI}
>
> (please doublecheck these look fine)
>
> You can test redirections to the previous site as follows:
>
> a) Edit your "/etc/hosts" or "\Windows\System32\services\etc\hosts" (not
> sure about the windows one) and add the following entry:
>
> 52.6.211.55     bits.netbeans.org
>
> This will make your operating system think that "bits.netbeans.org"
> points to "netbeans-vm.apache.org".
>
> Of course you want to remove this entry from your "hosts" file in the
> future.
>
> b) Try to load the following urls:
>
> http://bits.netbeans.org/
> (sample page, no redirection)
>
> http://bits.netbeans.org/dev/nightly/latest/
> (404 page, 302 redirection to Oracle site)
>
>
>
> The proposed plan now is:
>
> a) Please send me (again) the URLs of the zip files to add to the web
> server. These should come from zip files (javadoc, maven, whatever)
> generated by Jenkins in builds.apache.org. We may want to create an
> additional "timestamp" file with the date the zip file was built to avoid
> downloading unnecessarily (I don't know if build.apache.org acknowledges
> file timestamps properly).
>
> b) I'll add a cron job to periodically check timestamp, download if
> required, and extract the files in proper places. This may be run each,
> say, two hours? four hours? We can also create a web hook, but I'd rather
> not run stuff triggered externally.
>
> c) We'll contact infra to make the DNS changes to point bits.netbeans.org
> to 52.6.211.55 (no more hacking in your hosts file required then).
>
> d) We'll request a LetsEncrypt certificate once the DNS records are in
> place.
>
> e) We'll set up a secure web server once the certificates are in place.
>
>
> Is everything ok with the plan? Any problems you can see?
>
>
> Thanks,
> Antonio
>
>
>

RE: bits.netbeans.org web server

Posted by Eduardo Quintanilla <eq...@bnext.mx>.
HTTPS not supported ☹.

Best regards,
Eduardo Quintanilla
Software Developer 
Block Networks 

-----Original Message-----
From: Antonio <an...@vieiro.net> 
Sent: viernes, 7 de diciembre de 2018 1:52 p. m.
To: dev@netbeans.incubator.apache.org
Subject: bits.netbeans.org web server

Hi all,

So we now have a virtual web server for bits.netbeans.org with the following redirections:

        # Enable rewrite engine
        RewriteEngine On
        # If the requested stuff is not a file ...
        RewriteCond "%{REQUEST_FILENAME}" "!-f"
        # ... nor a directory ...
        RewriteCond "%{REQUEST_FILENAME}" "!-d"
        # ... then redirect (302) to Oracle's server
        RewriteRule "^/var/www/bits.netbeans.org/(.*)$"
"http://137.254.56.27/%{REQUEST_URI}" [L,R=302]
        # As a fallaback also redirect all 404 files
        ErrorDocument 404 http://137.254.56.27%{REQUEST_URI}

(please doublecheck these look fine)

You can test redirections to the previous site as follows:

a) Edit your "/etc/hosts" or "\Windows\System32\services\etc\hosts" (not sure about the windows one) and add the following entry:

52.6.211.55	bits.netbeans.org

This will make your operating system think that "bits.netbeans.org"
points to "netbeans-vm.apache.org".

Of course you want to remove this entry from your "hosts" file in the future.

b) Try to load the following urls:

http://bits.netbeans.org/
(sample page, no redirection)

http://bits.netbeans.org/dev/nightly/latest/
(404 page, 302 redirection to Oracle site)



The proposed plan now is:

a) Please send me (again) the URLs of the zip files to add to the web server. These should come from zip files (javadoc, maven, whatever) generated by Jenkins in builds.apache.org. We may want to create an additional "timestamp" file with the date the zip file was built to avoid downloading unnecessarily (I don't know if build.apache.org acknowledges file timestamps properly).

b) I'll add a cron job to periodically check timestamp, download if required, and extract the files in proper places. This may be run each, say, two hours? four hours? We can also create a web hook, but I'd rather not run stuff triggered externally.

c) We'll contact infra to make the DNS changes to point bits.netbeans.org to 52.6.211.55 (no more hacking in your hosts file required then).

d) We'll request a LetsEncrypt certificate once the DNS records are in place.

e) We'll set up a secure web server once the certificates are in place.


Is everything ok with the plan? Any problems you can see?


Thanks,
Antonio