After installing Pimcore demo i cannot enter /admin - pimcore

So i'm trying to install Pimcore to my local environment.
I followed the steps at: https://pimcore.com/docs/pimcore/current/Development_Documentation/Getting_Started/Installation.html
The install wen't fine with just one error about running a sql: * An exception occurred while executing 'DROP FUNCTION IF EXISTS PLUGIN_CMF_COLLECT_ASSET_SEGMENT_ASSIGNMENTS;
I did fix that by logging in to mysql as root and executed the query described from this: https://github.com/pimcore/pimcore/issues/4526
So, all installed i went to my browser and localhost. The Pimcore demo page loads, but with no images. And i'm not able to enter /admin. the page doesn't excist.
I have googled around for hours and read about filepermissions, so i set the pimcore project folder to rw for all users.
When i check the project folder i have no "web" folder or "admin" folder..
So where should i look next?
Should there be an admin folder in my project root?

So the problem seemed to be in httpd.conf
user _www (had to be my personal account)
group _www (had to be staff)
Also i have missed the AllowOverride All setting.

I had the same problem as a result of being sloppy..
Running on FreeBSD 13.1 with Apache 2.4 and PHP 8.1 with Composer 2, I made several attempts to install both the demo and the skeleton with the exact same outcome as this question poses.
The reason it failed was that I ran the installation as root. SU to the web service user - probably www - and try again.
Edit: I'd like to add that the installation instructions for Pimcore skips a crucial step for the installation. To a salty PHP developer, this is probably obvious, but for anyone else - after you run "composer create-project pimcore/demo my-project", enter the "my-project" folder (or whatever you chose to name it) and run "composer install".

One more important thing, that is missing in pimcore installation guide.
It looks like the installation doesn't create the .htaccess file in
your-project/public/.htaccess
I have created .htaccess according to:
https://pimcore.com/docs/pimcore/current/Development_Documentation/Installation_and_Upgrade/System_Setup_and_Hosting/Apache_Configuration.html
Make sure that Allowoverride All is set for your the DocumentRoot, in your VHOSTS settings - it is needed for .htaccess support.
<Directory /var/www/<your-domain>/public>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
*public is public directory in pimcore installation folder.
And now it is working well.

Related

Install drupal project with drupal in a subdirectory

My customer a has production environment with the following folder structure:
- www
|- maresmuseum
where I only have access to these two empty folders, being the "maresmuseum" the public_folder.
I've deployed my Drupal 9 site with composer, like the project-recommended way does, you know: placing the index.php along many other core related folders & files in "maresmuseum" folder, and /vendor, /tmp and many other private stuff in the "www" folder.
As a result, I can access my website through a url like this: https://example.com/maresmuseum (I'm quite sure my customer has a .htaccess rule somewhere to accomplish that, don't you?)
Given this production scenario, and having in mind I work with DDEV on local, I want to install this site on my local machine so I can access it with a url like this: https://example.local/maresmuseum.
Of course, all inner pages of this site must follow this url pattern, something like this:
https://example.local/maresmuseum/about-us
https://example.local/maresmuseum/contact, etc..
How should I configure DDEV to accomplish that?
Thanks in advance.
I'm sure there are many ways to do this. Here's one way to do it using nginx configuration changes.
I used https://blog.rebootr.nl/drupal-8-in-a-subdirectory-with-nginx/
ddev config --composer-root=maresmuseum --project-type=drupal9 --webserver-type=nginx-fpm --docroot=maresmuseum/web --create-docroot --web-working-dir=/var/www/html/maresmuseum (This sets up to put composer.json in maresmuseum)
Install Drupal 9: ddev composer create drupal/recommended-project --no-install
ddev composer require drush/drush
Install project, or load db, or whatever, maybe ddev exec vendor/bin/drush si -y demo_umami --account-pass=admin
Edit the .ddev/nginx_full/nginx-site.conf to remove the #ddev-generated and replace the location stanza, example in https://gist.github.com/rfay/5248e5f75bf3e27d84965bfdfc69c240#file-nginx-site-conf
Edit the maresmuseum/sites/default/settings.php to add the stanza suggested in the article to the bottom, example in https://gist.github.com/rfay/5248e5f75bf3e27d84965bfdfc69c240#file-settings-php
ddev restart && ddev launch /maresmuseum
https://<project>.ddev.site/maresmuseum will work fine (as it will without the directory).
I had some trouble with browser cache, so you'll want to pay attention to that.

Error 503 with httpd localhost server on Fedora 35

So I switched to Fedora and wanted to install LAMP on it. So I followed this article: https://computingforgeeks.com/how-to-install-lamp-stack-on-fedora/. Everything has been installed successfully. Afterward, I wanted to change the default root directory. In order to achieve it, I edited /etc/httpd/conf/httpd.conf and have set:
DocumentRoot "/home/muq/Localhost"
User muq
Group muq
<Directory "/home/muq/Localhost">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
And now I am getting the error: 503 Service Unavailable.
If I change User and Group to default (apache) the error I get is: 403 Forbidden.
Previously I was doing the same thing with Apache on PopOS and it was working fine.
Thank you all in advance!
Did you follow the step in the article which says to set SELinux to permissive? My guess is that you didn't, and that's what's happening: SELinux is preventing user home directory files from being served out by the web server.
You could just follow the advice in the article and just turn it off. But, I strongly recommend that you don't. The thing it's protecting you from here is a reasonable one — a misconfiguration could otherwise very easily expose personal user files to the internet. And here's the key thing: fixing this is really easy! At least as easy as the instructions for disabling SELinux in the article! You just need to do:
sudo chcon -R -t httpd_sys_content_t /home/muq/Localhost
to label that directory as one from which you want to serve httpd content. And that should do it — and still give you all the other protection of SELinux.
(You could also consider a location like /srv/www or /var/www/html as your web root, keeping your home directory out of the whole thing. These are parts of the filesystem designated for that, and to me as a former sysadmin seems cleaner. But the choice is yours.)

Symlink to raspberry pi webroot breaks

I have my raspberry pi setup as an internal web server. I have an external hard drive connected to the pi and mounted correctly.
I then symlink two folders from the hard drive to the web root on the pi, one is /Movies, and the other is /Series.
Initially this all works fine, as in if I hit http://192.168.1.17/Movies I get a list of all the files, I then click one and it starts playing no problem. However, after leaving it for a while and coming back, I can still get to the file directory in /Movies or /Series, but when I click a file, the web browser cannot open it.
I have no idea what's going on, it seems weird that I can still access the file directory, but playing a file doesn't work?
Any thoughts or help appreciated.
Are you using an apache server?
If so Symlinking is not a good idea.
An alternative which is more secure and may fix your problem is to install Userdir
sudo a2enmod userdir
Then you need to make a directory in home
mkdir public_html
Restart Apache
sudo service apache2 restart
If you want to change the home directory apache points to you can do so in /etc/apache2/mods-enabled/userdir.conf .Then change the <Directory /home/*/public_html> to the directory you want.
To access you're server simply enter ip_of_Rpi/~pi_username. e.g 192.168.0.100/~pi
more details here: http://ubuntuserverguide.com/2012/10/how-to-enable-and-configure-apache2-userdir-module-in-ubuntu-server-12-04.html
If you are using Apache web server, you can use mod_alias to map some directory in a URL path like this
Alias /mnt/external_disk01/movies /Movies
Alias /mnt/external_disk02/series /Series
Before use alias, make sure it is activated.
To activate:
a2enmod alias
more info in http://httpd.apache.org/docs/2.2/mod/mod_alias.html

How to install VQmod extension for opencart 2.0.x.x without using FTP

I have installed vqmod extension for opencart 2.0.1.0 from following link
http://www.opencart.com/index.php?route=extension/extension/info&extension_id=19501
I have followed installation steps till replaced files.
Now, how I should upload Opencart modifications on localhost.
On admin panel made following setting System->Setting->Store Edit->FTP
FTP Host : localhost
FTP Port : 22
FTP Username : XXXXXX
FTP Password : ******
FTP Root : C:\wamp\www\xxxx
Enable FTP : Yes
But still vqmod is not installed.So, where I am going wrong.
Note: I have made many changes in core files of opencart.
Hope so which doesn't affect vqmod installation.
Thanks in advance for any help.
Looks like you have access directly to your server (localhost - WAMP server), I suggest to follow the official instructions from github.com (https://github.com/vqmod/vqmod/wiki/Installing-vQmod-on-OpenCart) or try to follow my instructions below
First, you need to uninstall the one that you did, just navigate to /admin/controller/extension/ => Delete (backup first) installer.php and modification.php => Rename installer.php.original to installer.php and rename modification.php.original to modification.php
Second, to install vQmod for OpenCart 2:
Download v2.5.1-opencart.zip
Unzip it, inside you will find a folder named "vqmod"
FTP/Copy/Transfer "vqmod" folder to the root of your OpenCart installed folder (where you see: admin, catalog, image, system folders)
Make sure vqmod folder is writable (I guess you don't need to do this with WAMP server)
Then go to http://www.yoursite.com/vqmod/install - if you see a success message, then installation is done. If you see "index.php not writeable", then you need to set your root OpenCart index.php to writable. If you see "Administrator index.php not writeable", then make the "/Admin/index.php" to writable.
I believe for WAMP server (running under Windows), to make something writable = make sure that file don't have Read Only.
If you are not clear about something, just visit github page: https://github.com/vqmod/vqmod/wiki/Installing-vQmod-on-OpenCart
If you still have issue, post comments.

WordPress can't install themes

I can't workout how to solve this problem so wordpress would let me upload themes.
I have a fresh copy of Fedora 17 installed on my dev machine.
I then installed mysql using: yum install mysql mysql-server. Next I installed WordPress which also installs apache and php: yum install wordpress
I can go to http://localhost/wordpress and see WordPress working. But when I try tried to install my theme it asked for ftp credentials. I then updated the wp-config.php file and set the FS_METHOD constant to direct. Now it doesn't ask for ftp credentials but it gives me this error:
Could not create directory. /usr/share/wordpress/wp-content/themes/my-theme-name/
httpd service is running under 'apache' user and 'apache' group. The /usr/share/wordpress/ directory is recursively own by 'apache' user and 'apache' group too. I've even set the permissions to 777 (also recursively) and even then I keep getting the same error as above.
How can I solve this problem?
Fedoras SELinux configuration is most probably blocking the attempts of the webserver to write to the disk. To change the settings for your wordpress folder you can run this command (as root):
chcon -R -t httpd_sys_content_rw_t /usr/share/wordpress/wp-content
No need to do chmod 777 to the whole folder, this is a huge security risk. Of course this is for direct filesystem access, you have to disable the ftp access. For ftp access you will have to look up the right SELinux context.
You got the check these lines in your Wp-config.php (aproximatively line 105) :
define('FTP_USER', 'usr');
define('FTP_PASS', 'P#ssw0rd');
define('FTP_HOST', 'url');
You process of web server is running on apache but Wordpress will use the account define in the wp-config.php . So you got to set the group of your user to get access to these files.
Setting permissions 777 is not a solution, you got to care about it.

Resources