apache

Search engine and user friendly CodeIgniter URLs

<p class="MsoNormal"><span lang="EN-US">CodeIgniter is a PHP based programming framework which implements the model-view-controller paradigm. All HTTP requests have to pass the central index.php file (provided by CI) which initiates the framework controllers to load the views and render a site. So it is not possible to directly call a specific site by entering its URL. To open a specific site the according controller has to be called by passing its name as HTTP-Get-Variable to the central index.php. As a consequence every HTTP request is redirected to one single file and the URLs always contain variables which make them search engine and user unfriendly.</span></p><p>&nbsp;</p>

Securing a service using WS-Security

<p>We have an existing Web-Service accessible to everyone who knows the address of the endpoint. The software used on the server:</p><ul><li>Java 6</li><li>Apache CXF 2.2.3</li><li>SOAP Webservice</li></ul><p>Because of massive abuse in the past the access should be limited to authorized people only. The login credentials are stored in a database and should be checked with every request made on the service. The login data should be transmitted in the SOAP-Envelope header and an interceptor should&nbsp; verify the data before the actual invocation of a webservice method. The solution should be based on an open standard which is well defined.</p>

Unable to start Apache

<p><span style="font-family: &quot;Cambria&quot;,&quot;serif&quot;; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin;"><span style="font-size: small;"><span style="color: #000000;">As a part of one assignment&nbsp;in course Internet Security I had to install <span style="mso-spacerun: yes;">&nbsp;</span>and use Apache server. After installation, I started it by selecting the option Start from start menu but error occured. Following message appeared:</span></span></span></p><p><span style="font-family: &quot;Cambria&quot;,&quot;serif&quot;; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin;"><span style="font-size: small;"></span></span></p><p><span style="font-family: &quot;Cambria&quot;,&quot;serif&quot;; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin;"><span style="font-size: small;"><span style="color: #000000;"><em>Address already in use: make_sock: could not bind to address [::]:80<br />no listening sockets available, shutting down<br />Unable to open logs</em></span></span></span></p><p><span style="font-family: &quot;Cambria&quot;,&quot;serif&quot;; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin;"><span style="font-size: small;"></span></span></p><p><span style="font-family: &quot;Cambria&quot;,&quot;serif&quot;; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin;"><span style="font-size: small;"><span style="color: #000000;">After a lot of research on the Internet, finally I discovered possible solution.</span></span></span></p>

How to remote deploy a Web service to Apache Tomcat from within a Java program

The deployment of servlets to a Servlet container like Tomcat is usually a simple task: Just copy the developed servlet to a specific target directory. The container will then hot deploy it. The proposed task is however more complex: The goal is to make a programmatical remote deployment of a Web service. In other words, an already developed Web service is to be deployed from a PC to a remote server which is running a Tomcat Servlet container. This task has three major requirements: - First, the deployment has to be remote: The Web service is to be deployed onto a different machine. - Second, it is to be accomplished programmatically, which means that it is necessary to develop a software component (for example in Java) which will carry out that task. - Third, the deployment has to be “hot”, which means that the deployed Web service has to run after a short time, without the need to restart the server or its Servlet container. As an addition to the above it is interesting to know, how to use a Servlet container like Tomcat for Web service deployment. In short the goal is to develop an application which can “hot deploy” a Servlet containing one or more Web services onto a remote machine, which is only known to run an Apache Tomcat Servlet container. The process could be called: “Programmatical-remote-hot-deployment of a Web service to an Apache Tomcat Servlet container.”

How to correctly configure a Jetty Servlet container to be used through an Apache Web server via mod_jk

Here are the basic/central steps to take.

  1. Install mod_jk (and mod_rewrite).
    sudo aptitude install libapache2-mod-jk libapache2-mod-rewrite
  2. Adjust jk.conf.
    sudo vi /etc/apache2/mod-available/jk.conf

    JkWorkersFile /etc/apache2/workers.properties
    JkLogFile /var/log/apache2/jk.log
    JkLogLevel error
    JkMount /jetty/* jetty
    JkOptions +ForwardURIEscaped
  3. Add JK instance to workers.properties.
    sudo vi /etc/apache2/workers.properties

    worker.list=jetty
    worker.jetty.port=8009
    worker.jetty.host=localhost
    worker.jetty.type=ajp13
  4. Enable mod_jk.
    sudo a2enmod jk
  5. Enable mod_rewrite.
    sudo a2enmod rewrite
  6. Add virtual host conf.
    sudo vi /etc/apache2/sites-available/app.example.com

    <VirtualHost *>
    ServerName app.example.com
    ...
    RewriteEngine on
    RewriteRule ^(.*) /jetty/app$1 [L,PT]
    ...
    </VirtualHost>
  7. Enable site.
    sudo a2ensite app.example.com
  8. Reload Web Server conf.
    sudo /etc/init.d/apache2 reload

Some mod_jk properties are not supported by resp. not working right with Jetty (as opposed to Tomcat), e.g.:
socket_timeout, socket_keepalive, connect_timeout

Have fun! :-)

Use Dolphin on Mac OSX

Dolphin 6.1 from BoonEx is a community builder written in PHP and uses a MySQL database to store data. The main concept of Dolphin is to provide features that are used in social networks, such as building groups, share videos… Setting up Dolphin (on Mac OSX) is quite easy with the provided installation scripts (only some additional settings like for example permissions and additional graphical libraries are necessary). But still after a successful installation the system under Mac OSX doesn’t work perfect. The graphical operations are not executed correctly (and also some Ajax requests).

Correctly configuring a Jetty Java Servlet container to be used through an Apache Web server via mod_jk

When deploying a JVM-based Web app usually so-called Java Servlet containers resp. application servers are used for the produciton system/environment. Probably the most popular and common Java server in this field is Apache Tomcat (and other even more feature-rich ones like JBoss or GlassFish). Apart from that, there's also Jetty which can be seen as a somewhat lightweight alternative. Nevertheless, there are some subtle differences to be taken into consideration when configuring it as opposed to Tomcat. The usual way to setup such a production system for a Java Web app is to use the Servlet container to serve the Web app and put so to speak in front of it an Apache Web server which handles the requests, hands them over to the container instance (e.g., Jetty or Tomcat) and receives its responses then (to say it in an a bit simplified way). Usually this is done via Apache's mod_jk module which enables communication between app server and Web server through the AJP13 protocol. What should be described and explained now is how to setup such a Java Web app production system ready for deployment in detail (mainly from a configuration perspective). The main focus shall be put at differences which are to be taken into account here between Jetty and Apache Tomcat.

Setting up a Subversion repository and corresponding Trac app on a (Debian/Apache) server

So the basic problem here is how to best work together productively in a programming/development project and the question which are good tools providing capabilities to potentially support and improve this. One such tool is a version control systems (VCS) which basically helps to keep the code and especially its progress under (version) control in a code repository (transparently). A specific such VCS is Subversion (a.k.a. SVN). This is at the time one of the most popular and up-to-date systems of its kind (i.e., centralized VCS). Its basic slogan is "CVS done right" (which consequently can be seen as Subversion's indirect predecessor system). There are many tools available to work with Subversion from a client/user perspective like stand-alone client apps, integration in editors, e.g., via special plugins or also complete integration in a full-blown IDE (integrated development environment). Now, what's up to do is to actually setup a Subversion system on a server and to create a code repository for a programming/development project. In this case a Debian-based OS with an Apache Web server is chosen as infrastructure. Additionally a Trac app should be installed which among other things offers nice and convenient Web visualization of the code repository (and its progress) to users. When all this is in place users can take the benefits of using Subversion for version control of the code of the project.

Pages

Subscribe to apache