Write cookies with Apache
If you want to write cookies with Apache, you must use mod_headers. After this you can set cookies from every conf file: Header append set-cookie: “MyCookie=myValue; path=/;”
If you want to write cookies with Apache, you must use mod_headers. After this you can set cookies from every conf file: Header append set-cookie: “MyCookie=myValue; path=/;”
If you reach the limit of /tmp, an easy was to fix this is to create a symbolic link and to map /tmp to a partition with more space. 1. Quit all running applications 2. Become super user: #su – root 3. Delete the content from /tmp: #rm -r /tmp 4. Create the symbolic link: # ln… Read More »
RewriteRule /resource/(.+)?(.+) /resource/$1?other_query_string
RewriteEngine On RewriteBase /mydir RewriteRule ^mydir/(.*) http://my_other_server.com/other_dir/$1 [P] RewriteRule ^mydir/$ http://my_other_server.com/cgi-bin/other_dir/index.cgi [P] RewriteRule ^cgi-bin/other_dir/index.cgi(.*) http://my_other_server.com/cgi-bin/other_dir/index.cgi$1 [P] # RewriteCond %{REQUEST_URI} ^index.cgi* RewriteRule ^index.cgi(.*) http://my_other_server.com/cgi-bin/other_dir/index.cgi$1 [P] RewriteRule ^mydir/index.cgi(.*) http://my_other_server.com/cgi-bin/other_dir/index.cgi$1 [P] RewriteEngine On RewriteBase /mydir RewriteRule ^mydir/(.*) http://my_other_server.com/other_dir/$1 [P] RewriteRule ^mydir/$ http://my_other_server.com/cgi-bin/other_dir/index.cgi [P] RewriteRule ^cgi-bin/other_dir/index.cgi(.*) http://my_other_server.com/cgi-bin/other_dir/index.cgi$1 [P] # RewriteCond %{REQUEST_URI}… Read More »
Server Variables are variables set by Apache, and held inside the super global array ‘$_SERVER’. They hold very interesting snippits of data available for use, and become very useful when developing PHP projects. $_SERVER[‘REQUEST_URI’] It return the URL in to access the page which is executing the script. If you need to type http://www.example.com/product.php?id=5 to… Read More »
If you want you can include other configuration file into a Virtual Host, but you must not define any other <VirtualHost *:8080> Include /etc/apache2/conf.d/my_other_conf/*.conf </VirtualHost> If you don’t define the virtual host *:80, all the configuration from standard httpd.conf will be loaded in all other Virtual Host.
If you want to truncate a file into Linux, you can use the following commands: > my_file
OpenSuSE 11 has a strange and funny way for loading the modules. If you try to load modules by modifying an .conf file, you will be surprised when you will realize that at the restart, your change will be lost. You have two options: 1. Load that modules only when you need it, in a custom… Read More »
If you have OpenSuSE 11, you will have a big surprise when you try to use mod_rewrite. You will not find any mod_rewrite. The only think you must do is to activate mod_rewrite with the following command: # a2enmod rewrite # rcapache2 restart
If you want to set up the default SMTP server for Linux you have to go to YaST2: YaST2 -> Network services -> Mail Transfer Agent -> Standard -> Permanent -> your outgoing smtp server (use Masquerading to mask your local machine, use Authentification for authentification purpose) -> Finish