Skip to content

Instantly share code, notes, and snippets.

@ryanschuhler
Created August 3, 2016 20:30
Show Gist options
  • Save ryanschuhler/0663e25b96d3fcd57278c0940c4e55b9 to your computer and use it in GitHub Desktop.
Save ryanschuhler/0663e25b96d3fcd57278c0940c4e55b9 to your computer and use it in GitHub Desktop.
- httpd.conf (on all nodes)
- (old) (comment out) CustomLog logs/access_log combined
- (new) (add) CustomLog logs/access_log liferay
- (old) (leave as is) LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"” combined
- (new) (add) LogFormat "%h %l %u %t %m %f \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%U\" \"%q\" %T %D %{ANONYMOUS_USER_ID}C %{JSESSIONID}C %{hubspotutk}C %{OSB_USER_ID}C %{OSB_COMANY_ID}C” liferay
- apache.conf
- (old) (replace) match => { "message" => "%{IPORHOST:client_ip} (?:%{DATA:remote_log_name}|-) (?:%{USERNAME:remote_user_id}|-) \[%{HTTPDATE:timestamp}\] %{WORD:request_method} %{DATA:file_name} \"%{WORD:request_method} (?:%{URIPATHPARAM:relative_request_path}|/&|/https&|\*) HTTP/%{NUMBER:http_version}\" %{NUMBER:request_status} (?:%{NUMBER:bytes:int}|-) \"(?:%{DATA:referrer}|-)\";? \"(?:%{DATA:user_agent}|-)\" \"(?:%{DATA:relative_path}|-)\" \"(?:%{DATA:query_string}|-)\" %{NUMBER:time_in_seconds:int} %{NUMBER:time_in_micro_seconds:int}” }
- (new) (change to) match => { "message" => "%{IPORHOST:client_ip} (?:%{WORD:remote_log_name}|-) (?:%{WORD:remote_user_id}|-) \[%{HTTPDATE:timestamp}\] %{WORD:request_method}%{GREEDYDATA:file_name} \"%{WORD:request_method}(?:%{URIPATHPARAM:relative_request_path}|/&|/https&)HTTP/%{NUMBER:http_version}\" %{NUMBER:request_status} (?:%{NUMBER:bytes:int}|-) \"(?:%{DATA:referrer}|-)\" \"(?:%{DATA:user_agent}|-)\" \"(?:%{DATA:relative_path}|-)\" \"(?:%{DATA:query_string}|-)\" %{NUMBER:time_in_seconds:int}%{NUMBER:time_in_micro_seconds:int}” }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment