1. Club Seiden uses Gitter chat for day to day discussion. If you are a member of Github you just need to ask to join our Github organization: https://github.com/club-seiden and join us on the Gitter.IM chat page!
    Dismiss Notice

Better loggin

Discussion in 'Apache' started by Christian Dubé, Oct 27, 2015.

  1. Christian Dubé

    Christian Dubé New Member

    Getting back from ZendCon 2015, I realized many example/sessions used Apache config and none of them used custom logs. If you run a single application, it may be fine. If you run multiple applications or use multiple containers (we use a different VirtualHost for each developer), then custom logs is simple to set up and will help you debug problems.

    In you http.conf file

    or prefered Zend's method: (here you can have has many conf file containing a single VirtualHost, simply change MyApp to whatever represent your app)

    By adding the lines in bold to your own conf, you will separate every request/error made to this containers.
    <VirtualHost *:26589>
    DocumentRoot /www/MyApp/public

    SetEnv APPLICATION_ENV "development"
    ErrorLog /www/weblog/MyApp_error.log
    CustomLog /www/weblog/MyApp_access.log combined

    <Directory /www/MyApp/public>
    ## configs


    Note: the actual path needs to exist and give QTMHHTTP *RWX access
    kingston likes this.

Share This Page