How to give apache permission to write to home directory?

As your file residing in your Home directory, I would suggest one of following approaches. Give 0777 permission to file itself. chmod 0777 /home/djameson/test.txt Change Ownership to apache user www-data and give owner-write permission. sudo chown www-data:www-data /home/djameson/test.txt chmod 0744 /home/djameson/test.txt Add your user to www-data group or vice-verse add www-data user to your group. … Read more

tunneling secure websocket connections with apache

I’ve got it working. Scenario ————- —————- ———- | Browser |<—–>| Apache httpd |<—–>| Tomcat | | | SSL | 2.4.9 | SSL | 7.0.52 | ————- —————- ———- Browser WebSocket through Apache httpd, reverse proxying to the web app in Tomcat. All SSL front-to-back. Here’s the configuration for each piece: Browser Client Note the … Read more

mod_rewrite urlencoding an already urlencoded query string parameter – any way to disable this?

the way to accomplish this is via the NE (no escape) paramater. RewriteRule ^something.swf$ http://www.newdomain.com/something.swf [R=302,L] should in fact read RewriteRule ^something.swf$ http://www.newdomain.com/something.swf [R=302,NE,L] this will force mod_rewrite to leave all query string values as they are, without doing any encoding / escaping. as easy as that 🙂

.htaccess – Redirect subdomain to folder

Add this to your .htaccess in your web root / directory RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^m\.daltonempire\.nl$ [NC] RewriteCond %{REQUEST_URI} !^/m(/|$) [NC] RewriteCond %{REQUEST_FILENAME} !-d # not a dir RewriteCond %{REQUEST_FILENAME} !-f # not a file RewriteRule ^(.*)$ m/$1 [L] The %{REQUEST_FILENAME} conditions would let you access /exists.php and not rewrite it to /m/exists.php. … Read more

How can I access password protected Excel workbook in Java using POI api

POI should be able to open both protected xls files (using org.apache.poi.hssf.record.crypt) and protected xlsx files (using org.apache.poi.poifs.crypt). Have you tried these? If you’re using HSSF (for a xls file), you need to set the password before opening the file. You do this with a call to: org.apache.poi.hssf.record.crypto.Biff8EncryptionKey.setCurrentUserPassword(password); After that, HSSF should be able to … Read more

How can I have CodeIgniter load specific pages using SSL?

There are few ways to tackle this. Option 1: I would probably have the code deployed to both folders, then in the file: /system/application/config/config.php, set your page to: $config[‘base_url’] = “http://www.yoursite.com/”; or $config[‘base_url’] = “https://www.yoursite.com/”; Then in your non-ssl VirtualHost folder, set your config to redirect protected pages by folder to the SSL site: RedirectPermanent … Read more

Why does index.html have priority over index.php?

It really depends on the Server you’re using. This is a matter of configuration. It’s not that there’s any advantage from using html vs php filetype. You could say that the .html variation takes precedence due to the fact that it’s the most basic web format. If you’re using Apache, just check the default .htaccess … Read more