# Beginner tutorial problems\[Resolved\]

**URL:** https://discourse.slimframework.com/t/beginner-tutorial-problems-resolved/139
**Category:** Questions
**Created:** [April 16, 2016, 3:17pm UTC](https://discourse.slimframework.com/t/beginner-tutorial-problems-resolved/139 "2016-04-16T15:17:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![guano](https://avatars.discourse-cdn.com/v4/letter/g/d9b06d/32.png) [@guano](https://discourse.slimframework.com/u/guano)
#### Post date: [April 16, 2016, 3:17pm UTC](https://discourse.slimframework.com/t/beginner-tutorial-problems-resolved/139/1 "2016-04-16T15:17:39Z")

</div>

Hello,  
I’m having troubles with setting up apache2 to work with slim. I’m actually not sure what the problem is as I’m quite green in regards to pretty much anything web related. I have been following the tutorial found here [http://www.slimframework.com/docs/tutorial/first-app.html](http://www.slimframework.com/docs/tutorial/first-app.html) but I am stuck on setting up the configuration of apache2. I know this is only related to apache2 as ‘php -S localhost:8080’ works as per the tutorial. Running the apache2 server returns the contents of the index.php file, fx calling slimproject.dev or slimproject.dev/hello returns the contents of index.php.

Here’s my .htaccess file:

```
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

```

Here’s my apache2 virtualhost setup:

```
<VirtualHost *:80>
    ServerName slimproject.dev
    ServerAlias www.slimproject.dev
    ServerAdmin webmaster@localhost
    DocumentRoot "path/src/public"

    #ErrorLog ${APACHE_LOG_DIR}/error.log
    #CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory "path/src/public">
	    AllowOverride All
	    Require all granted
    </Directory>
</VirtualHost>
```

---

<div class="post-metadata">

### Author: ![tflight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/tflight/32/1205_2.png) [@tflight](https://discourse.slimframework.com/u/tflight)
#### Post date: [April 16, 2016, 6:45pm UTC](https://discourse.slimframework.com/t/beginner-tutorial-problems-resolved/139/2 "2016-04-16T18:45:17Z")

</div>

How was Apache installed? It sounds as if PHP might not even be enabled within Apache if you are getting the file contents back.

---

<div class="post-metadata">

### Author: ![guano](https://avatars.discourse-cdn.com/v4/letter/g/d9b06d/32.png) [@guano](https://discourse.slimframework.com/u/guano)
#### Post date: [April 16, 2016, 7:53pm UTC](https://discourse.slimframework.com/t/beginner-tutorial-problems-resolved/139/3 "2016-04-16T19:53:06Z")

</div>

Yes, that’s it! I missed that libapache2-mod-php5 wasnt installed correctly when I did it. Thanks for pointing it out to me, it works perfectly now.
