Apache
Configure Apache deployment to proxy connections to other ports
[+]Finally if everything above worked out for you then Gitlab should be waiting for you at http://git.yourdomain.com:<PORT> where <PORT> is what we set back in step 14. If you’re happy with this then you’re done. Login with the default username and password (admin@local.host / 5iveL!fe) for Gitlab and start using it. If you’re already running a web server and couldn’t run Gitlab on standard web ports add the following to your Apache config to proxy connections from Apache to Gitlab
[root@localhost~] vim /etc/httpd/conf/httpd.conf # -------- Make the following edits -------- <VirtualHost *:80> ServerName git.yourdomain.com DocumentRoot /data/apps/sa_gitlab/gitlab/public CustomLog logs/git.yourdomain.com combined ErrorLog logs/git.yourdomain.com-error.log ProxyPass / http://127.0.0.1:65527/ ProxyPassReverse / http://127.0.0.1:65527/ ProxyPreserveHost On </VirtualHost> # -------- Save and close the file -------- [root@localhost~] /etc-init.d/apache2 restart
Redirects apache connections to internal (privates IPs) servers
[+]Scenario: We have a main server typically with some hostname: main.server.com and we have an application called, e.g., `app` in and internal server with internal IP: 192.168.1.66 and running our `app` as `http://192.168.1.66/app`
In the main server, run the following command to get a list of available Apache modules
a2enmod # You will be presented with an output similar to: # Your choices are: access_compat actions .... # Which module(s) do you want to enable (wildcards ok)?
The list of modules:
proxy proxy_ajp proxy_http rewrite deflate headers proxy_balancer proxy_connect proxy_html
The main server works as usual except when the URL with the `app` is requested: http://main.server.com/app. The following configuration allows to serve the `app` from the internal server!
It is accomplished if we modify the default configuration file 000-default.conf inside /etc/apache2/sites-enabled to set up "proxying" functionality.
Here, we will be defining a proxy virtual host using mod_virtualhost and mod_proxy together.
Copy-and-paste the below block of configuration, amending it to suit your needs:
<VirtualHost *:*> ServerName main.server.com # ServerAdmin webmaster@localhost DocumentRoot /var/www/html # Servers to proxy the connection, or; # List of application servers: # Usage: # ProxyPass / http://[IP Addr.]:[port]/ # ProxyPassReverse / http://[IP Addr.]:[port]/ # Example: ProxyPass /app http://192.168.1.66/app ProxyPassReverse /app http://192.168.1.66/app </VirtualHost>
Execute the following command to restart Apache:
systemctl restart apache2
You can make /var/www/html/app a real folder and put there, for example, redirections from other domains.
<VirtualHost *:*> ServerName other.com # ServerAdmin webmaster@localhost DocumentRoot /var/www/html ProxyPass /app http://192.168.1.66/app ProxyPassReverse /app http://192.168.1.66/app </VirtualHost>
and
<html><head><title>other</title> <meta http-equiv="refresh" content="0; url=http://other.com/app"> <body></body></html>
Deploying Jupyter hub behind a reverse proxy
[+]Non Advanced Search or Natural Search
Advanced Search or Boolean Search
Default search behavior
By default, all search terms are optional. It behaves like an OR logic. Objects that contain the more terms are rated higher in the results and will appear first in their type. For example, wiki forum will find:
- objects that include both terms
- objects that include the term wiki
- objects that include the term forum
Requiring terms
Add a plus sign ( + ) before a term to indicate that the term must appear in results. Example: +wiki forum will find objects containing at least wiki. Objects with both terms and many occurences of the terms will appear first.
Excluding terms
Add a minus sign ( - ) before a term to indicate that the term must not appear in the results. To reduce a term's value without completely excluding it, use a tilde. Example: -wiki forum will find objects that do not contain wiki but contain forum
Grouping terms
Use parenthesis ( ) to group terms into subexpressions. Example: +wiki +(forum blog) will find objects that contain wiki and forum or that contain wiki and blog in any order.
Finding phrases
Use double quotes ( " " ) around a phrase to find terms in the exact order, exactly as typed. Example: "Alex Bell" will not find Bell Alex or Alex G. Bell.
Using wildcards
Add an asterisk ( * ) after a term to find objects that include the root word. For example, run* will find:
- objects that include the term run
- objects that include the term runner
- objects that include the term running
Reducing a term's value
Add a tilde ( ~ ) before a term to reduce its value indicate to the ranking of the results. Objects that contain the term will appear lower than other objects (unlike the minus sign which will completely exclude a term). Example: +wiki ~forum will rate an object with only wiki higher that an object with wiki and forum.
Changing relevance value
Add a less than ( < ) or greater than ( > ) sign before a term to change the term's contribution to the overall relevance value assigned to a object. Example: +wiki +(>forum < blog) will find objects that contain wiki and forum or wiki and blog in any order. wiki forum will be rated higher.