Ivorde Unix/Linux/Database/Web/Mail Forum

View unanswered posts
View active topics
It is currently Sat Feb 04, 2012 11:18 pm


News News of Ivorde Unix/Linux/Database/Web/Mail Forum

Site map of Ivorde Unix/Linux/Database/Web/Mail Forum » Forum : Ivorde Unix/Linux/Database/Web/Mail Forum

Welcome to ivorde.ro forum

 [ Total topics 139 Go to page 1 ... 7, 8, 9, 10, 11, 12, 13, 14

Message
 Post subject: Remove "X-Powered-By: PHP/5.2.11" from HTTP headers of your web server
PostPosted: Wed Mar 24, 2010 1:49 pm 
HTTP 1.1 protocol, as most of the other protocol, uses headers for the communication between client (usually browser) and server.

An example of the header looks like:
HTTP/1.1 200 OK
Date: Wed, 24 Mar 2010 04:03:41 GMT
Server: Apache/2.2.11 (Unix) DAV/2 PHP/5.2.11 with Suhosin-Patch mod_ssl/2.2.15 OpenSSL/0.9.8k
X-Powered-By: PHP/5.2.11
Set-Cookie: phpbb3_qxggi_u=1; expires=Thu, 24-Mar-2011 04:03:41 GMT; path=/; domain=forum.ivorde.ro; HttpOnly
Set-Cookie: phpbb3_qxggi_k=; expires=Thu, 24-Mar-2011 04:03:41 GMT; path=/; domain=forum.ivorde.ro; HttpOnly
Set-Cookie: phpbb3_qxggi_sid=514ad39b91e1e29bcb1a7553dcb8f4a7; expires=Thu, 24-Mar-2011 04:03:41 GMT; path=/; domain=forum.ivorde.ro; HttpOnly ...

Read more : Remove "X-Powered-By: PHP/5.2.11" from HTTP headers of your web server | Views : 3055 | Replies : 0 | Forum : Apache, Nginx, Lighttpd and other web server software

Top
 Post subject: Apache 2.2 installation of mod_rewrite module without recompiling whole apache
PostPosted: Tue Mar 23, 2010 6:22 pm 
Usually I keep my sources available at all times because apache or php could require a new module to be installed (sooner or later). I will post here how to install apache mod_rewrite module without recompiling whole apache from source.

Below is the source of the mod_rewrite apache module on my system.
Code:
# cd /usr/src/httpd-2.2/modules/mappers
#  ls *c | grep rewrite
mod_rewrite.c


I will be using the apache extension tool (apxs):
man apxs: ...

Read more : Apache 2.2 installation of mod_rewrite module without recompiling whole apache | Views : 5792 | Replies : 0 | Forum : Apache, Nginx, Lighttpd and other web server software

Top
 Post subject: mysqlnd cannot connect to MySQL 4.1+ using old authentication
PostPosted: Tue Mar 23, 2010 2:05 pm 
Php 5.3 introduces a cool new alternative to the old libmysql library: mysqlnd (mysql native driver).

How to compile php with this driver or more details about mysqlnd are not scope of this post, but authentication method is.

By default, Mysql is using old_passwords method of storing passwords in 16 char length. Mysqlnd usses a new authentication engine which stores passwords in 41 character length.

To check how mysql currently stores passwords:
mysql> show variables ...

Read more : mysqlnd cannot connect to MySQL 4.1+ using old authentication | Views : 1719 | Replies : 0 | Forum : Apache, Nginx, Lighttpd and other web server software

Top
 Post subject: FreeBSD - fuser checking processes that are using a filesystem
PostPosted: Thu Mar 18, 2010 1:58 pm 
fuser -- list IDs of all processes that have one or more files open

man fuser:
Quote:
DESCRIPTION
The fuser utility shall write to stdout the process IDs of processes that
have one or more named files open. For block and character special
devices, all processes using files on that device are listed. A file is
considered open by a process if it was explicitly opened, is the working
directory, root directory, jail root directory, ...

Read more : FreeBSD - fuser checking processes that are using a filesystem | Views : 752 | Replies : 1 | Forum : System administration

Top
 Post subject: FreeBSD portupgrade without port vulnerability check
PostPosted: Thu Mar 18, 2010 1:12 pm 
Portupgrade, portinstall are two tools used to upgrade installed packages or install new ones via ports or packages systems.

man portupgrade:
Quote:
SYNOPSIS
portupgrade

[ pkgname_glob ...]

DESCRIPTION
The portupgrade command is used to upgrade installed packages via ports
or packages. The portinstall command is equivalent to portupgrade -N.

Before reading these instructions, you must understand ...

Read more : FreeBSD portupgrade without port vulnerability check | Views : 547 | Replies : 0 | Forum : BSD Operating Systems

Top
 Post subject: Openssl: Commandline base64 string encoding
PostPosted: Fri Mar 05, 2010 6:50 pm 
To encode a string into base64, echo and openssl system utilities can be used:
Code:
# echo -n 'somepassword' | openssl enc -base64
c29tZXBhc3N3b3Jk


The -n switch to echo is used to supress echoing a new line character. For example, below is a difference between base64 encoded string that doesn't contain newline and on that does:
Code:
# echo -n 'somepassword' | openssl enc -base64
c29tZXBhc3N3b3Jk
# echo 'somepassword' | openssl enc -base64
c29tZXBhc3N3b3JkCg==

Read more : Openssl: Commandline base64 string encoding | Views : 2232 | Replies : 1 | Forum : Tutorials for general Unix

Top
 Post subject: Using echo, netcat(nc) and tr to create an HTTP connection
PostPosted: Thu Mar 04, 2010 12:01 pm 
Fortunately for debugging HTTP connections, there is a very simple way of generating one from command line when elinks or lynx are not available.

For this we need the most basic http command and header: GET/POST and Host.

Code:
# echo 'GET / HTTP/1.1 Host: www.mysite.ro'
GET / HTTP/1.1 Host: www.mysite.ro


but the above output is not valid for sending it to a web server. We need some new lines added to it:

# echo ...

Read more : Using echo, netcat(nc) and tr to create an HTTP connection | Views : 1692 | Replies : 0 | Forum : Tutorials for general Unix

Top
 Post subject: Unix shell - using TR to replace new lines with spaces
PostPosted: Thu Feb 25, 2010 3:08 pm 
Unix shell - using TR to replace new lines with spaces

There are a few ways of replacing new lines with other characters. Below I'll show a few examples for replacing new lines in strings or standard input/output.

Replace new lines with spaces:

# cat test.file
In the first synopsis form, the characters in string1 are translated into
the characters in string2 where the first character in string1 is trans-
lated into the first ...

Read more : Unix shell - using TR to replace new lines with spaces | Views : 3724 | Replies : 0 | Forum : Shell Scripting and Programming

Top
 Post subject: SED how to remove multiple white spaces from a string
PostPosted: Thu Feb 25, 2010 2:14 pm 
This article will show only a few example that would be enough for most people:

How to remove multiple white spaces from a string:
Code:
# echo 'some     white            spaces' | sed 's/  *//g'
somewhitespaces


How to replace multiple white spaces from a string:
Code:
# echo 'some     white            spaces' | sed 's/  */\ /g'
some white spaces


Above sed command replaces multiple spaces with a single space. You can adjust it to replace multiple ...

Read more : SED how to remove multiple white spaces from a string | Views : 7951 | Replies : 0 | Forum : Shell Scripting and Programming

Top
 Post subject: Starting nginx: [emerg]: directive "rewrite" is not terminated by ";"
PostPosted: Tue Feb 23, 2010 1:05 pm 
Code:
Starting nginx: [emerg]: directive "rewrite" is not terminated by ";" in /usr/local/nginx/vhosts/www.site.com.conf:45


Even though the Nginx configuration file contains a rewrite rule which is terminated corectly (with
Code:
last;
), if a rule contains curly brackets {}, then those brackets finish the location directive in Nginx configuration prematurely, thus making Nginx complaining about line termination.

Example:
Code:
system {
                   listen  80;
...
                    location / {
...                                 
                                      rewrite ^/[a-z0-9_-]*-[a-z]{1}([0-9]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ /gymrss.php?$8=$1&$3&$5&$7&gzip=$9 last;
...                                 
                    }                                     
}

[hence the curly brackets in ...

Read more : Starting nginx: [emerg]: directive "rewrite" is not terminated by ";" | Views : 1095 | Replies : 0 | Forum : Apache, Nginx, Lighttpd and other web server software

Top
 [ Total topics 139 Go to page 1 ... 7, 8, 9, 10, 11, 12, 13, 14


Last 10 active topics


TCP/IP Networking

No new posts "OSPF not enabled on this interface" FreeBSD Quagga ospfd interface status
View the latest post

AIX

No new posts AIX 5 find -maxdepth replacement: -prune (finding without descending subdirectories)
View the latest post

Apache, Nginx, Lighttpd and other web server software

No new posts Remove "X-Powered-By: PHP/5.2.11" from HTTP headers of your web server
View the latest post
No new posts Apache 2.2 installation of mod_rewrite module without recompiling whole apache
View the latest post
No new posts mysqlnd cannot connect to MySQL 4.1+ using old authentication
View the latest post

System administration

No new posts FreeBSD - fuser checking processes that are using a filesystem
View the latest post

BSD Operating Systems

No new posts FreeBSD portupgrade without port vulnerability check
View the latest post

Tutorials for general Unix

No new posts Using echo, netcat(nc) and tr to create an HTTP connection
View the latest post

Shell Scripting and Programming

No new posts Unix shell - using TR to replace new lines with spaces
View the latest post
No new posts SED how to remove multiple white spaces from a string
View the latest post

Login

Username:   Password:   Log me on automatically each visit  

Statistics

Statistics

Total posts 188 | Total topics 681 | Total members 811



News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC + 2 hours [ DST ]

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
DAJ Glass 2 template created by Dustin Baccetti

phpBB SEO