nginx configuration # Let Nginx handle static files # location ~ ^.*\.git/objects/([0-9a-f]+/[0-9a-f]+|pack/pack-[0-9a-f]+.(pack|idx)) { location ~ ^/[^/]*\.git/objects/([0-9a-f]+/[0-9a-f]+|pack/pack-[0-9a-f]+.(pack|idx)) { auth_basic “strong authentication”; auth_basic_user_file /********/apps/etc/basic.auth.strong.passwords.txt; root /********/GITRepoUbuntu/; } # Pass Git Smart HTTP requests to git-http-backend. Require Auth for everything. # see man […]
Month: August 2016
Spring security
HTML translated to java config see also Java Configuration see also http://www.springframework.org/schema/security/spring-security.xsd <http security=”none” pattern=”/resources/**”/> <http pattern=”/api1/**” create-session=”stateless”> <intercept-url pattern=”/**” access=”authenticated”/> <http-basic /> </http> <http pattern=”/api2/**” create-session=”never”> <intercept-url pattern=”/api2/api21/**” access=”hasRole(‘ROLE_ADMIN’)”/> <intercept-url pattern=”/api2/**” access=”hasRole(‘ROLE_USER’)”/> <http-basic /> </http> <http pattern=”/api3/**”> <intercept-url pattern=”/api3/api31/**” […]
Linux various commands
# show only first line found: grep “search this” nohup.out | sed -n ‘1p’ # show only last line found: grep “search this” nohup.out | sed -n ‘$p’ # copy to current path the file /home/gigi/systemctl-services.txt # from adrhc.go.ro (remote […]
Ubuntu and Oracle
# see also https://wiki.centos.org/HowTos/Oracle12onCentos7 # see also https://adrhc.go.ro/wordpress/centos-and-oracle/ # Follow this (works with Ubuntu 16.04 too): # http://www.techienote.com/install-oracle-12c-on-ubuntu/ # systemd oracle.service (working when only one db is automatically started with /etc/oratab) [Unit] Description=Oracle 12c After=local-fs.target Wants=local-fs.target [Service] Type=forking User=oracle Group=oinstall […]
Docker
How To Install Docker on Ubuntu 19.04 Kitematic which provide a GUI to the users avoid typing sudo whenever you run the docker command sudo usermod -aG docker ${USER} # check service status sudo systemctl status docker # pull and […]
Systemd and systemctl
# see https://www.freedesktop.org/wiki/Software/systemd/TipsAndTricks/ systemctl -> shows all active units systemctl list-units –type=service -> shows all active services (–all to see loaded but inactive services too) systemctl list-units –type=swap -> shows swap unit configurations # show cgroup tree systemd-cgls # services […]