Skip to main content

Posts

Showing posts with the label apache

Securing Websited Hosted with Apache Web Server

In my previous article about Creating or Updating Users in htpasswd File, we saw how to create, update and remove user from htpasswd file. In this article, we will see how we can configure this file in Apache web server so that users will be prompts to provide credentials for accessing the web sites hosted with Apache web server. Follow my previous article and setup the users. Next, go to httpd and open the file which has virtual host configurations for your web site. Update the virtual host entry, it should looks something like this: Note that AuthType , AuthName , AuthUserFile and Require are important. Make sure to remove " Require all granted " from the virtual host entry (if you have it already). Otherwise, your website will be accessible without any authentication. That's it. Restart you Apache Web Server and now you will be prompted to provide credentials when you try to access the web site. P.S. Click here to access my other posts.

Creating or Updating Users in htpasswd File

The Apache   HTTP Server is free and open-source cross-platform web server. It can be configured to protect either entire website or part of the website. Once the authentication is enabled, user will be prompted to enter credentials to access the web pages. It is two step process, first, we need to setup the user credentials, and second, we need to configure these credentials in Apache. In this article, we will be covering the first part i.e. setting the user credentials. We will be using htpasswd comand line tool to create and manage users. I would suggest to login a root user. Let's say, we will be storing user credentials in this file: /etc/.apache_users 1. Setup credentials for very first user 2. Add new user to existing file ( note: do not use -c option, if already exists, it is rewritten and truncated ) 3. Update password for existing user 4. Remove user from the file In next article , we will cover how to configure these credentials in Apache. P.S. Click...

Apache Directory Studio - An Error Has Occurred

Have you ever faced an error while launching Apache Directory Studio ? I faced this error recently on my MAC OS. Problem: I was using Apache Directory Studio for past few months without any issues, but yesterday all of a sudden I was getting below error while I was attempting to launch Apache Directory Studio application on my MAC. Note that I am using Apache Directory Studio version 2.0.0.v20130628 I open the log file to check the error message, it was so confusing. Error message was something like this: Root Cause: I recently installed latest Java version i.e. Java 9 on my MAC and I encountered this issue due to the Java version upgrade. The error message in the log file is bit misleading. Solution: To resolve this issue, you can follow below mentioned steps: Click here and refer my other post to install multiple versions of Java on your MAC OS. Make sure you install Java 7 on your MAC OS. Execute this command to get the Java 7 location: /usr/libexec/java_home...

LDAP Users and Groups for API Authentication and Authorization

Today, API security has become one of the most important thing. It is a vast field with many approaches and meanings. Most commonly, people refer API security as Authentication and Authorization . Encryption can also be included in this space, but lets keep that aside for separate discussion. For this article, lets just focus on how to use LDAP for API Authentication and Authorization. There are many frameworks like Spring, etc. which can be used to connect your application with LDAP for Authentication. LDAP does not handle Authorization piece but it can return "Groups" and based on that you application can either authorize or deny the request. In this article, we will see following: How to create a user in LDAP How to create a group in LDAP How to assign user to the group in LDAP Refer this link if you wish to setup OpenLDAP on your MAC. I had used JXplorer before but for this article I am going to use Apache Directory Studio . Moreover, I am going to use Apa...

Run JMeter Tests with Maven

In this article, I will be focusing on configuring JMeter with Maven but lets first understand some basics of JMeter and Maven. The Apache JMeter™ application is open source software, a 100% pure Java application designed to load test functional behavior and measure performance. These days, performance testing is very very important especially when the applications are targeting large number of users. There are many tools available in market, some are paid, some are free. Apache JMeter is one such free and open source software. Though JMeter's was initially developed for load testing web applications, it is now far more advanced. The biggest advantage of the JMeter is that it can do many things like performance and functional testing for web services, databases, FTPs or Web Servers, LDAP, JMS, trigger emails/notifications. Most of these features are implemented with plugins. JMeter is powerful, easy to install and use and FREE! It is a Java desktop application with simple us...