How to change /var/www to other folder on oxvm_base?

Hi!
I have installed virtualmachine from OXID.
I used composer to install OXID.
Now domain link to folder /var/www. How to change in VM to link domain with /var/www/xxx/source???
Should i do this with personal.yml or manual in linux?

This is my personal.yml:

vagrant_local:
vm:
name: thisisname
hostname: thisisname.local.dev
aliases:
- www.thisisname.local.dev
php:
version: 7.0
apache:
docroot: /var/www/thisisname/source

without docroot change it works but with www.thisisname.local.dev/thisisname/source

Hi @walldemar,

apparently, you’ve studied this already, haven’t you? https://oxidforge.org/en/assemble-a-local-dev-environment-not-only-for-oxid-eshop-6-in-a-vagrant-box.html.

Actually, in a local dev environment, it usually doesn’t matter if you use / or source/ or whatever but I understand the question as it will become kind of a challenge on the live server later, right?

On this page, I am collecting the possibilities we have with this, depending on the access rights on your live server: https://github.com/OXIDprojects/OXIDforge-pages/blob/master/forward_into_source.md. Please note that this is nothing official, just a collection of possibilities:

  • Adapt your vhost (if possible),
  • set a symlink (and don’t forget to secure vendor/ in this case) or
  • work with .htaccess (should be possible in most cases).
1 Like

I think you should do it in personal.yml, not manually in Linux.
The whole point of using vagrant is to let vagrant do the configuration (provisioning).

2 Likes

Thanks a lot @marco.steinhaeuser . I found your article earlier :slight_smile: good job

At this time i created oxid vm, create oxid shop on it - IT WOKRS FINE

Now i try to move this oxid instance on shared server (without shell access).

  • i copied files and db
  • and modified htaccess from RewriteBase /deev6/source to: RewriteBase /
  • and changed config.inf

OXID is loaded (admin panel to) but… for example when i hover mouse on logo or HOME button it shows me correct link www.xxx.de but when I click on it, it redirect me to www.xxx.de/deev6/source/oxseo.php/ with error: “The requested page ‘deev6/source/oxseo.php/’ couldn’t be found.” - it should be www.xxx.de/seo.php

Links to products, category products works well.

I tried to regenerate views and seourl in oxid panel but it still works wrong.

Alright. “oxseo.php” used to be used in OXID eShop < version 6. “seo.php” is used from version 6 on as name spaces are introduced with this version. Did you - by accident - did a version mix up on local dev environment and/or productive mayhap?

Also, what exactly did you move from dev to live? Did you find these instructions as well:
https://docs.oxid-esales.com/developer/en/6.0/getting_started/installation/eshop_installation_without_composer.html

Did you possibly upload the files over a previous installation without clearing it first?
And, as always, clear the tmp folder.

@m431342 - i cleared tmp folder to. I uploaded full composer project folder from my VM (shop was installed on VM) to ftp folder. Is it wrong?

@marco.steinhaeuser - yes, i read this but maybe i don’t understand everything. It is insruction how to install new instance of OXID. My purpose is to have two enviroments of the same, one shop (development/local pc/vm and production on shared server without composer and shell access).

#####################
P.S
I don’t know how but today it’s work. Probably it was something with server cache, tmp, etc… Links which didn’t works correct yesterday, today works well on other computer in my work. Need to check on home after work and test it.

If we talk about link you pasted (@marco.steinhaeuser ) i don’t understand this: “In case you have no shell access to the remote server, you have to delete the symbolic links and to manually create alternative files, which have to be copied to the application server.” and code below. Should i do something with this? Were/How should i do this even if i want to create new oxid instance? This is not clear for me.

Thanks guys for your help! :slight_smile:

Good morning @walldemar,

Most likely your browser cache, tapped into this trap not only once…

I requested the author of this article :wink:

1 Like

You need the symbolic links in /vendor/bin (or the alternative files) during setup. But the symbolic links created by composer cannot be transfered with ftp, that’s why you should delete them and create alternative files that can be transfered. You can just paste the code in a terminal on your local machine.

If you look at the code, the first line takes you to your shop root folder (You have to replace the name of the directory of course). The second line deletes all files currently present in /vendor/bin. Then there are 3 Blocks that start with “cat”. Each of those blocks will create a new file in /vendor/bin.

1 Like

Hmmmm… yep i pasted it on my temrinal on VM. It’s works. Soo this files are important only for setup/install. But when i want to copy/move oxid eshop instance (already created working shop) from VM to server without composer.

  1. I should delete files from vendor/bin/* and thats all?
  2. should these files must be generated only on machine were oxid instance will be deployed? If yes, how should i run these code in terminal without access to shell on shared server?
  3. or maybe should i delete all files in vendor/bin/*, run shell command on my local vm and then copy to FTP?

Thanks for your patience :slight_smile:

Yes exactly like this.

1 Like