0

I am new to Symfony, and I've just created a new project on Windows server + Php7.3 + Apache 2.4. The project folder is located at C:\Apache24\htdocs\symfony.

When I access that folder from my web browser, I see the directory listing page it should show the index page in the public folder.

Here is my code in apache:

<VirtualHost *:90>
    ServerAdmin [email protected]
    DocumentRoot "${SRVROOT}/htdocs/"
    ServerName localhost
    <Directory "${SRVROOT}/htdocs/symfony/public">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

And i tried to use .htacess option as in Symfony guideline with install symfony/apache-pack, but no luck:

<VirtualHost *:90>
    ServerAdmin [email protected]
    DocumentRoot "${SRVROOT}/htdocs/"
    ServerName localhost
    <Directory "${SRVROOT}/htdocs/symfony/public">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>
  • the .htaccess file had been created in public folder.
  • i have tried to install the demo application too, the same issue.
  • Wordpress or other applications have been installed without issue.

Thank you.

2
  • How did you install PHP + Apache? Is it a manual installation? If so, maybe this guide starting points 7 & 8 helps (the installation part before is unix specific, but points 7 & 8 are general configuration for php+apache): php.net/manual/en/install.unix.apache2.php Commented Jan 31, 2020 at 9:10
  • Ya, i install manually for both on Windows OS, not using any WAMP tool like XAMPP. Commented Jan 31, 2020 at 9:20

1 Answer 1

3

Shouldn't the DocumentRoot also be pointing to the Symfony public directory?

<VirtualHost *:90>
    ServerAdmin [email protected]
    DocumentRoot "${SRVROOT}/htdocs/symfony/public"
    ServerName localhost
    <Directory "${SRVROOT}/htdocs/symfony/public">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.