Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

403 error after installation #725

Closed
3ruce opened this issue Apr 25, 2019 · 9 comments
Closed

403 error after installation #725

3ruce opened this issue Apr 25, 2019 · 9 comments

Comments

@3ruce
Copy link

3ruce commented Apr 25, 2019

Describe the bug
After installation, the browser returns a 403 and the apache log reads as follows

[Thu Apr 25 14:40:49.240945 2019] [autoindex:error] [pid 25384] [client 10.114.60.123:41688] AH01276: Cannot Cannot serve directory /home/admin/web/public_html/: No matching DirectoryIndex (index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive

To Reproduce
I suspect this is an Apache config option based on googling the error. This is the extract from the apache config file for the VirtualHost

    <Directory /home/admin/web/public_html>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
        php_admin_value open_basedir /home/admin/web/public_html:/home/admin/tmp
        php_admin_value upload_tmp_dir /home/admin/tmp
        php_admin_value session.save_path /home/admin/tmp
    </Directory>

Logfile

[Thu Apr 25 14:40:49.240945 2019] [autoindex:error] [pid 25384] [client 10.114.60.123:41688] AH01276: Cannot Cannot serve directory /home/admin/web/public_html/: No matching DirectoryIndex (index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive

Additional context
Add any other context about the problem here.

  • Kimai version - latest from git clone
  • PHP version - 7.1
@kevinpapst
Copy link
Member

@3ruce
Copy link
Author

3ruce commented Apr 25, 2019

👍 any pointers though?

@kevinpapst
Copy link
Member

Did you read the links?
Yes, pretty sure your document root is wrong. But please: ask someone else how to configure your Webserver. Definitely not the right place here.

@3ruce
Copy link
Author

3ruce commented Apr 25, 2019

I love it... I'm running 18 other PHP apps, all are configured via VestaCP and work fine... I've tweaked the odd open_basedir value but otherwise it's smooth sailing 🤔

@kevinpapst
Copy link
Member

the index.php is in public/

@3ruce
Copy link
Author

3ruce commented Apr 25, 2019

Ok, so the login/home url is mywebsite.com/public/index.php?

Having logged in to that url, this is the next error... which, according to this issue is a php version problem...

php -v returns PHP 7.1.28-1+0~20190412071216.17+stretch~1.gbpbe9b36 do you think that might be the problem?

[Thu Apr 25 17:04:23.610195 2019] [:error] [pid 7437] [client 10.114.60.123:55558] PHP Fatal error:  Uncaught TypeError: Return value of Symfony\\Component\\Dotenv\\Dotenv::populate() must be an instance of Symfony\\Component\\Dotenv\\void, none returned in /home/admin/web/public_html/vendor/symfony/dotenv/Dotenv.php:96\nStack trace:\n#0 /home/admin/web/public_html/vendor/symfony/dotenv/Dotenv.php(57): Symfony\\Component\\Dotenv\\Dotenv->populate(Array)\n#1 /home/admin/web/public_html/public/index.php(15): Symfony\\Component\\Dotenv\\Dotenv->load('/home/admin/web...')\n#2 {main}\n  thrown in /home/admin/web/public_html/vendor/symfony/dotenv/Dotenv.php on line 96

@3ruce
Copy link
Author

3ruce commented Apr 25, 2019

Having logged in to that url

I mean having loaded that url...

@kevinpapst
Copy link
Member

You should point your DocumentRoot to public, which is everything written in the documentation.

If you want to use a fully-featured web server (like Nginx or Apache) to run Kimai, configure it to point its DocumentRoot at the public/ directory. For more details, see https://symfony.com/doc/current/setup/web_server_configuration.html

https://www.kimai.org/documentation/faq.html#dotenvpopulate-must-be-an-instance-of-symfonycomponentdotenvvoid

@lock
Copy link

lock bot commented Jun 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@lock lock bot locked and limited conversation to collaborators Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants