Setup X-Forwarded Proto in Apache
RequestHeader set X-Forwarded-Proto “http”
RequestHeader set X-Forwarded-Proto “https”
|
||||||
Setup X-Forwarded Proto in Apache
JBOSS virtual hosts Edit /opt/jboss5.0/jboss-as/server/default/deploy/jboss.sar/server.xml to include your virtual hosts.
Using Apache mod_jk with BigIP LTM and JBOSS Using Apache mod_jk with BigIP LTM and JBOSS 1) Make sure your JBOSS is running and listening on AJP port 8009 2) LTM Load Balancer Configuration 3) Configure mod_jk in apache Update these values to read as worker.node1.port=8009 4) Test the browser website URL Jboss with Apache integration Jboss Apache integration is same procedure of Tomcat Setup. 🙂 so they are not hard to so. 1) Download mod_jk module from http://www.gtlib.gatech.edu/pub/apache/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.28/i586/ 2) Copy mod_jk-1.2.28-httpd-2.2.X.so to /opt/apacheconf 3) Edit the httpd.conf and add the following line 4) Create /opt/apacheconf/mod-jk.conf file with the following content JkMountFile /opt/apacheconf/uriworkermap.properties
5) Create /opt/apacheconf/uriworkermap.properties file with the following content 6) Create /opt/apacheconf/workers.properties file with the following content # Define Node2 # Load-balancing behaviour # Status worker for managing load balancer The above configuration is to test with one app server functionally. 7) Update /opt/apacheconf/httpd-vhosts.conf with JkMount 8) Update the following line to include jvmRoute in /opt/jboss-eap-5.0/jboss-as/server/default/deploy/jbossweb.sar/server.xml 9) Restart Apache and JBOSS server 10) Test the web server URL http://{domain-name}/testWeb/test.jsp Jboss Linux Tuning Linux Tuning Optimization 1) Commands to check current settings before updating sys parameters ulimit -n cat /proc/sys/net/core/rmem_default /sbin/ifconfig -a cat /proc/sys/kernel/shmmax 2) Edit /etc/sysctl.conf and append these values # Increase default socket send and receive buffers net.core.wmem_default=262122 3) Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and append MTU 4) echo 2147483647 > /proc/sys/kernel/shmmax or update sysctl.conf 6) Edit /etc/limits.conf and set ulimit value Vi Editior How to copy data in VI editor vi first edit source file Copying a block of text from one file to another in Vi To copy a block of text between files execute the commands: For Vi Editor VI editor is the default file editor in most of the Linux/Nix machines. It is having great capabilities to edit a file with in few key strokes. Lets start with some general information and then move on to some good things what vi editor can do for you while editing a file. Learning vi editor and remembering them is a very a easy task if you learn it in a systematic way. a. Modes of VI : Command mode : Inserting mode : Note : All comments will work in command mode only. b. Navigational commands : How to use above commands in clever way? 2. Word Navigation Examples : 3. Setting (nu) mbering to lines 4. Moving paragraphs 5. Moving page up/down 6. Moving start/end of the file 7. Going to any line : Example : c. Editing commands 8. Replace one letter >9. Editing one word 10. Editing one line 11. Cutting Examples : 12. Pasting 13. Coping 14. Special commands d. Search and replace 15. Search for a term /term Example : If you want to search for suresh then press /suresh enter 16. Searching and replacing a term(here separator is / ) To search and replace particular term from given line to other given line. e)Save and quiting a file Memory commands How do I find out System / Server Memory Utilization under RHEL / CentOS / any other Linux distribution? A. You need to use free command which, displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel. Type the free command at shell prompt: total used free shared buffers cached vmstat command vmstat command provides more information : procs ———–memory———- —swap– —–io—- –system– —–cpu—— Understanding vmstat memory options * swpd: the amount of virtual memory used. $ vmstat -a procs ———–memory———- —swap– —–io—- –system– —–cpu—— The following command displays one new line of utilization data every second procs ———–memory———- —swap– —–io—- –system– —–cpu—— Free Memory on Linux at Runtime Display Only The Process IDs of Lighttpd ps -C lighttpd -o pid= ps -p 55977 -o comm= CPU COMMAND PU COMMAND 10 cpu usage command ps -e -o pcpu,cpu,nice,state,cputime,args –sort pcpu | sed ‘/^ 0.0 /d’ ####Watch changeable data continuously watch -n.1 ‘cat /proc/interrupts’ cat /proc/interrupts Check CPU Temperature Check those commands which have been used most Linux System Monitoring Commands #1: top – Process Activity Command Commonly Used Hot Keys The top command provides several useful hot keys: What are the CPU states found in “top” output? # us -> User CPU time: The time the CPU has spent running users’ processes that are not niced. #2: vmstat – System Activity, Hardware and System Information The command vmstat reports information about processes, memory, paging, block IO, traps, and cpu activity. vmstat 3 Display Memory Utilization Slabinfo # vmstat -m Tail, Vmstat and Date in Loop, Output every 10 Sec 3: w – Find Out Who Is Logged on And What They Are Doing w command displays information about the users currently on the machine, and their processes. #4: uptime – Tell How Long The System Has Been Running # uptime #5: ps – Displays The Processes Show Long Format Output # ps -Al Print All Process On The Server # ps ax Memmory commands cpu commands Print Security Information # ps -eo euser,ruser,suser,fuser,f,comm,label Set Output In a User-Defined Format ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm ps -eopid,tt,user,fname,tmout,f,wchan Display sorted process taking most CPU in descending order Grep Command some examples of grep command: * Print Apache’s documentroot directory name: $ grep -i documentroot /etc/httpd/conf/httpd.conf * View file contents without comments and empty lines: $ grep -Ev “^$|^#” /etc/my.cnf * print only IP address assigned to the interface: $ ifconfig eth0 | grep ‘inet addr:’ | cut -d’:’ -f2 | awk ‘{ print $1}’ * How many email messages sent for a particular date: $ cat /var/log/maillog | grep “status=sent” | grep “May 25” | wc -l * Find out a running process/daemon from process list (thanks to staranneph for recalling this): ps -ef | grep mysql * You can also note cpu/mem usage by using above. like in below command output, you can see that Plesk’s statistics process is utilizing more than 18% cpu alone: [root@myserver ~]# ps aux | grep statistics |
||||||
Copyright © 2025 - All Rights Reserved Powered by WordPress & Atahualpa |
Recent Comments