Skip to main content

Posts

Showing posts with the label webserver

Self Signed SSL Certificates

Ever wondered how to enable SSL or HTTPS on your site? If you dont want to pay for commercial SSL certificates, you could create self signed certificates for your site by following the instructions here: https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-12-04 The instructions in the site above will make your default site HTTPS enabled. If you prefer having a commercial SSL, save your certificate files and key files in your server and edit the location on the /etc/apache2/sites-enabled/default to point to the directory where you stored those files.

PHP Curl and You

I have 2 servers which I wanted to talk to each other, one is a web server running Ubuntu and the other a Windows Server 2008. My task was to be able to create Active Directory users using PHP and from what is available, I found a very neat library for PHP called adLDAP . It had all the necessary functions needed to manage your Active Directory save for the very troublesome fact that you need to use LDAP over SSL in order for the module to be able to create accounts and change passwords. Everything else works without LDAP over SSL. At first I was trying my hand out in making it work without the LDAP over SSL. But after some research, I found out that it is required by Windows Server itself to accommodate account creation. Knowing a bit about certificates and on how modern browsers typically screws over displaying the page due to those 'certificates cannot be verified' errors, I had little choice in this matter. At first I thought maybe that error prompt could be a minor nui...

PHP Upload Limit

Sometimes, you write a code which has upload features or backing up a database then only to find out that your PHP installation limits your upload to 2mb. Ive encountered this problem while I was backing up databases using phpMyAdmin and realized that the file ive downloaded is too huge for an upload without tweaking the necessary files. So with this I resulted to editing the php.ini file to accommodate a larger file upload size. The php.ini file varies from one location to another depending on your install (may it be Windows, Mac or Linux).. In my Linux server (Ubuntu) its found in /etc/php5/apache2/ Here are the variables you need to watch file_uploads upload_max_filesize max_input_time memory_limit max_execution_time post_max_size You may change the values as you like but take note that setting some things higher (ie. memory_limit) would consume your resources a bit more. So be careful in editing. After tampering the settings, you may need to restart your Apache servi...

When You Think JSP is Better

And you want to install Apache Tomcat instead of the usual Apache, you may follow this guide on how to install Tomcat effortlessly through apt-get. Because I Think JSP Is Still Cooler You need to tweak it a little to set the default ports. Though the guide tackles the post configuration needed to run this.