Pimcore Installation - Debian

Hi,

I’m trying to install pimcore with composer on a Debian distribution with composer.
I instaled LAMP on my server and i execute these commands to install Pimcore :

cd /var/www/
sudo COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo-basic pimcore
Cd pimcore
sudo ./vendor/bin/pimcore-install

When i write in my browser http://XX.XX.XX.XX/pimcore, i have a folder tree without the frond-end of the app.

Can you help me ? i forgot something to do …

Thanks

You should go to domain.com/pimcore/web. For a production environment you should only make the web directory publicly available.

Thanks for your reply.

When i go to domain.com/pimcore/web i have a list of folders / files in my browser.

aaa

And when i click on app.php, i get exceptions :slight_smile:

### (2/2) ErrorException

Warning: file_put_contents(/var/www/html/pimcore/var/cache/dev/appAppKernelDevDebugContainerDeprecations.log): failed to open stream: No such file or directory
in  **Kernel.php**  line 555
at Kernel->initializeContainer()in  **Kernel.php**  line 186
at Kernel->initializeContainer()in  **Kernel.php**  line 133
at Kernel->boot()in  **Kernel.php**  line 165
at Kernel->boot()in  **Bootstrap.php**  line 350
at Bootstrap::kernel()in  **app.php**  line 31

### (1/2) RuntimeException

Unable to create the cache directory (/var/www/html/pimcore/var/cache/dev)
in  **Kernel.php**  line 647
at Kernel->buildContainer()in  **Kernel.php**  line 549
at Kernel->initializeContainer()in  **Kernel.php**  line 186
at Kernel->initializeContainer()in  **Kernel.php**  line 133
at Kernel->boot()in  **Kernel.php**  line 165
at Kernel->boot()in  **Bootstrap.php**  line 350
at Bootstrap::kernel()in  **app.php**  line 31

Thanks for your help

Have you set “AllowOverride all” in the apache config? Looks like your .htaccess is not loaded / allowed to ‘override’ settings.

And check the permissions, make sure the www user has rights/permissions to write files.

@lorenzonjeanmarc check out my docker images, they are also based on debian:

Maybe you can get an clue on how to configure it correctly from there

Thanks for your help.

I change directive AllowOverride All in the apache config and change all the permissions of pimcore folder to www-data:www-data.

I have an 500 Internal Server Error now.

I don’t why, i try to check apache logs, but i am unable to open apache errors.log.

I’m stuck ! i don’t understand, and my knowledge becomes limited :slight_smile:

Since your knowledge is limited it’s hard to tell what really is the problem at this point. Try using the docker setup dpfaffenbauer posted?

Hi,

I give my installation procedure after installing lamp server on my debian server .

Composer installation :
sudo apt-get install curl
sudo curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo chmod +x /usr/local/bin/composer

Database configuration :
step database configuration
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
innodb_file_format = Barracuda
innodb_file_per_table = ON
innodb_large_prefix = ON
sudo service mysql stop
sudo service mysql start

Pimcore installation :
cd /var/www/
sudo COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo-basic pimcore
Cd pimcore
sudo ./vendor/bin/pimcore-install

I execute these commands :slight_smile.

When i check URL http://xxx/pimcore/web i have a page without CSS.

sudo chown -R www-data:www-data /var/www/html/pimcore/
sudo chmod -R 755 /var/www/html/pimcore/
sudo nano /etc/apache2/sites-available/pimcore.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/pimcore/web
ServerName example.com
ServerAlias www.example.com

 <Directory /var/www/html/pimcore/web/>
      Options FollowSymlinks
      AllowOverride All
      Require all granted
 </Directory>

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

 <Directory /var/www/html/pimcore/web/>
        RewriteEngine on
        RewriteBase /
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*) index.php [PT,L]
</Directory>

sudo a2ensite pimcore.conf
sudo a2enmod rewrite
sudo systemctl restart apache2.service

Is it possible to have some help ? please.

I think that i have a problem with virtualhost of apache.

Thanks