0

I have som problems with setting up a new project in apache. I have an old project in sub.domain.com/api/something.php, but am trying to add a new project (symfony) that requires a DirectoryIndex, sub.domain.com/api-v2/something/something

My old directory structure was just like this:

/var/www/sub.domain.com/www/api/

With sub.domain.com/www as document root. to get my new project working, I just added a symlink like this:

/var/www/sub.domain.com/www/api-v2 --> /var/www/symfony/web

This worked good when specifying app_dev.php in the url, but it dosn't work with the regular app.dev front controller, even when specifying

https://sub.domain.com/api-v2/something/something
https://sub.domain.com/api-v2/app.php/something/something

https://sub.domain.com/api-v2/app_dev.php/something/something <-- works

I'p not good with Apache, and this is my ssl.conf file:

LoadModule ssl_module modules/mod_ssl.so
Listen 443
KeepAlive On
SSLPassPhraseDialog  builtin
SSLSessionCache         shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout  300
SSLMutex default
SSLRandomSeed startup file:/dev/urandom  256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin

<VirtualHost _default_:443>
        DocumentRoot "/var/www/sub.domain.com/www"
        ServerName sub.domain.com:443
        ErrorLog logs/error_sub.domain.com.log
        TransferLog logs/access_sub.domain.com.log
        LogLevel warn
        SSLEngine on
        SSLProtocol all -SSLv2
        SSLHonorCipherOrder On
        SSLCipherSuite ALL:!ADH:!EXP:!LOW:!RC2:!3DES:!SEED:!RC4:+HIGH:+MEDIUM
        SSLCertificateFile /etc/httpd/ssl/rapid.crt
        SSLCertificateKeyFile /etc/httpd/ssl/rapid.key
        SSLCertificateChainFile /etc/httpd/ssl/rapid.ia.crt

        <Files ~ "\.(cgi|shtml|phtml|php3?)$">
            SSLOptions +StdEnvVars
        </Files>
        <Files "log.txt">
            Order Allow,Deny
            Deny from all
        </Files>
        <Directory "/var/www/cgi-bin">
            SSLOptions +StdEnvVars
        </Directory>
</VirtualHost> 

Any help would be gratly apprecieated.

Richard87
  • 240
  • 1
  • 2
  • 6

1 Answers1

0

Alright, so after more searching, I found a solution that works for me, hope it will help someone else!

Everything I needed was a Alias /url/ "path" (and some extra Directory settings) :)

Alias /api-v2/ "/var/www/symfony/web/"
<Directory "/var/www/symfony/web/">
     Options Indexes FollowSymLinks MultiViews ExecCGI
     AllowOverride All
     Order allow,deny
     Allow from all
</Directory>
Richard87
  • 240
  • 1
  • 2
  • 6