Fedora DNF Proxy

Fedora’s Package manager DNF requires proxy if you are behind a company network. To enter the details: sudo nano /etc/dnf/dnf.conf add the below line and replace it with your settings and credentials: proxy=http://URL:PORT/ proxy_username=OPTIONAL-IF-NOT-MANDATORY proxy_password=OPTIONAL-IF-NOT-MANDATORY save the file and give it a shot. For troubleshooting you can always tail -f /var/log/dnf.log For my Setup Fedora

Creating and converting an ssl certificate in numerous formats

Creating a key file  openssl genrsa -des3 -out tugrul.key 1024 Creating CSR(Certificate Signing Request) file openssl req -new -key tugrul.key -out tugrul.csr Creating a CRT  Self-Signed SSL Certificate openssl x509 -req -days 365 -in tugrul.csr -signkey tugrul.key -out tugrul.crt Converting a Certificate File to PKCS#12(PFX) Format openssl pkcs12 -export -out tugrul.p12 -inkey tugrul.key -in tugrul.crt -certfile

LAMP Stack on Windows

Apache 2.4 Installation Download Apache 2.4.16 win32 from Apache lounge – http://www.apachelounge.com/download/ Unzip entire content to C: and keep the folder name as given Visual C++ Redistributable for Visual Studio 2015 package for Win32 and install it – https://www.microsoft.com/en-us/download/details.aspx?id=48145 Go to unzipped Apache folder –> conf edit httpd.conf and edit those lines; Listen *:80 remove #

configure ssl

Export from JKS to PKCS #12. keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore.p12 -deststoretype PKCS12 -srcalias <jkskeyalias> -deststorepass <password> -destkeypass <password> mv keystore.p12 /root cd /root convert to key openssl rsa -outform der -in private.pem -out private.key nano /etc/httpd/conf.d/ssl.conf find the line <VirtualHost _default_:443> uncomment ServerName and type servername:443 uncomment: SSLEngine on SSLCertificateFile /root/downloadedcertificate.crt SSLCertificateKeyFile /root/private.key

Configure SSL on Apache and Glassfish and forward traffic to Glassfish

keytool -keysize 2048 -genkey -alias tugrulaslan.net -keyalg RSA –dname “CN=tugrulaslan.net,O=company,L=Istanbul,S=Istanbul,C=TR” -keystore keystore.jks keytool –certreq –alias tugrulaslan.net –keystore keystore.jks –file cert_req.csr keytool -import -alias tugrulaslan.net -keystore keystore.jks -trustcacerts -file yourdomain.com.crt send that csr to generate your ssl file then download x509 certificate from geotrust then move the certificate to /root IMPORT SSL INTO KEYSTORE   download

Apache Mod_proxy to forward http traffic to Java App server 8080

In my vps server I wanted to forward http port 80 to glassfish 8080 ports without having glassfish config changed. So I assume httpd apache server is installed. So cd /etc/httpd/conf nano httpd.conf Add the below lines and save and restart apache <VirtualHost *:80> # Your domain name ServerName Domain_NAME_HERE ProxyPreserveHost On ProxyPass / http://localhost:8080/