2

I have a problem to manage two virtual host on apache2 Ubuntu.

The following is the structur on my /var/www

  1. Owncloud
  2. Portal

My stroyboard is like this : I want to create a web portal that have a owncloud service. The IP of portal is : http://192.168.5.222. And I want to give the owncloud have address on https://192.168.5.222 .

So I created two .conf on /etc/apache2/sites-available

  1. portal.conf

    <*VirtualHost *:80>

    ServerAdmin itjkt@tresnamuda.co.id
    ServerName 192.168.5.222
    ServerAlias tresnamuda.local
    
    DocumentRoot /var/www/portal
    
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    

    <*/VirtualHost>

  2. Owncloud.conf

    <*VirtualHost *:443>

    ####Configuration for SSL ##### SSLEngine on SSLCertificateFile /etc/apache2/ssl/owncloud.pem SSLCertificateKeyFile /etc/apache2/ssl/owncloud.key #### End of SSL Configuration ####

    DocumentRoot /var/www/owncloud/

    <Directory /var/www/owncloud> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> <*/VirtualHost>

You know, I learn to install owncloud from this references : Noobslab . On http:Success. But on https: owncloud gives me an error like this :

Internal Server Error

The server encountered an internal error and was unable to complete your request.

This is my apache2.conf :

# Global configuration
    Mutex file:${APACHE_LOCK_DIR} default
    PidFile ${APACHE_PID_FILE}
    Timeout 300
    KeepAlive On
    MaxKeepAliveRequests 100
    KeepAliveTimeout 5
    User ${APACHE_RUN_USER}
    Group ${APACHE_RUN_GROUP}
    HostnameLookups Off
    ErrorLog ${APACHE_LOG_DIR}/error.log
    LogLevel warn

    IncludeOptional mods-enabled/*.load
    IncludeOptional mods-enabled/*.conf
    Include ports.conf


    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
    </Directory>

    <Directory /usr/share>
        AllowOverride None
        Require all granted
    </Directory>

    <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
        Allow from all
    </Directory>

    <Directory /var/www/portal>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    AccessFileName .htaccess

    <FilesMatch "^\.ht">
        Require all denied
    </FilesMatch>

    LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
    LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %O" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent

    IncludeOptional conf-enabled/*.conf


    IncludeOptional sites-enabled/*.conf

Any help or suggestion it so appreciated.

  • Look in /var/log/apache2/error.log and you should see more specific information about the error. I would guess that either you are missing some php dependency or that the SSL configuration isn't quite right. If you post the log of the 500 error I'll be able to help you more effectively. – Jacob Margason Jun 25 '15 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.