How can I change the directory of weblogic installation? - linux

I have the Oracle Weblogic binaries installed in a particular location on linux servers. For example, -
/oracle/middleware1211/
I also have the 'user_projects/domains' installed in the same directory. For example, -
/oracle/middleware1211/user_projects
My question is , how do I reconfigure/move the "user_projects" or "domains" directory out of the current directory ? For example, location should be, -
/oracle/user_projects
Not planning to rename the domains , just move the directories so we have a same directory structure across all weblogic environments.
We are in the process of consolidation of all our Weblogic environments, and one of the steps is getting the domains moved outside the main Weblogic binary installation.
Thank you for your replies in advance.
I have tried using , reconfig.sh , to change the installation directory, but could not get it to work as I wanted to. Hoping there are some other alternatives or methods I can look into.

You can move a Weblogic Domain, changing the DOMAIN_HOME in the domain scripts.
If you check all the scripts in the path /oracle/middleware1211/user_projects/domain_name/bin, you have this variable, with the current domain path, in some of them.
You have to copy all the domain directory to the new location, the best way is with rsync command and the domain stopped. You can sincronice the first time with the domain started, but i recomend you to do a last sincronization when you stop the domain, before the domain path changes.
After that, you have to change all the DOMAIN_HOME variables in all the scripts located in the new location (/new_domains_location/domain_name/bin/), with the new domain path and starts the domain.
Starts first the admin server in the new location, and check in the log files that all is correct, then starts the managed servers.
If you have any problem and does not works, you can starts the domain in the old location, that is unchanged and have to works.
Obviously, you could make a first attempt in a test domain (or a new installed domain), to verify that the process is correct. Then you have to do the same steps with the rest of the domains.
Hope this can help you.

Related

Cpanel is not giving me option to change the root directory for one of my domains

I need to change the root directory for one of my domains,
But in my cpanel i dont find any options, just hard cores of system, but i have very basic knowledge about systems and servers.
How i can change that directory as easy as possible? I just need to change something because im gonna install laravel, and i want to change the public html to the public of laravel.
I was looking for the file that has the apache config, but it says like "the current config doesnt need to be changed or updated, bacause can be overryde", so i tought in Cpanel maybe i got an option for this.
Thanks, By the way i got an VPS, not shared. Using CENTOS 7.9.
Thanks and good night ^^
In cPanel, you can't change main domain directory/document root. If you want to change the document root, just change the main domain to another/random domain. Then add the domain that you want to change the root directory as addon domain
It's not recommended overriding Apache config. It's may break your system. WHM/cPanel exists to manage domains without a system admin knowledge
Do you try change this using console in Centos?
maybe will be better using console and open the file that contain the directory root

How can I move my old sites from shared host server to VPS?

I'm sure a lot of you guys used to be in the same situation as I am at right now.
Before
I used to owned shared hosting for about 2 years.
I kind of get used to it, whenever I create a new site.
I just need to upload my entire new folder including : index.html , styles, scripts, and other assets via FTP into the root directory to my shared host server. Then, I go to the url of that folder, I will see the site loaded, that's how I normally do it.
Now
I upgrade the way I host my site. I just recently purchased a VPS on Digital Ocean, and run Laravel application on it. Now, the site is way faster, and I have more control.
Unfortunately, I'm not sure what to do with all my old sites that I used to have.
How do move them into my new VPS ?
How do I go to them ? How is that work ?
Should I create a public_html folder or something ?
How can I achieve something like this ?
Any direction on this will be much appreciated !
Depending on your setup (single domain, multi-domain). If you're dealing with a single domain environment you'll just move everything over like normal. If you're in a multi-domain environment you'll need to point all your domains to the new server and setup different apache sites (config files) that point to their respective locations on disk.
In my experience with multi-domain environments and Apache 2.4 it's best to have /var/www/ be your center where you can store your .htpasswd or any other files like that, and a folder named public which has your outward facing websites in their subfolders.
Example:
web1.com would exist in /var/www/public/web1.com/...
web2.com would exist in /var/www/public/web2.com/...
You could alternatively have another public folder, but if you're specifically asking about laravel you'd want to point the apache config to the public directory as if you go any higher people have access to your .env file.
If you have everything in your single domain environment (public_html) and you now have a laravel site at your root you could alias a specific path to act as your "old site" data that points to a different folder than your laravel install.

Possible to use Virtual Path to an external disk on Plesk Managed Windows server?

After getting a helpful answer from this post I want to store media on a separate harddrive on the windows server. Is it possible to make those files available via http?
I soon discovered that Plesk does not allow me to create a virtual path that points to a location outside of my website root. I want the virtual path to point to a folder on D: (an extra disk, not the same as the website root directory)
Only two possible solutions I could think of, although I can't find them any where.
1) Maybe plesk has an advanced configuration file that prevents it from overwriting certain things in IIS when it runs its maintenance jobs or updates, specifically the Virtual Path I created directly in IIS outside of plesk.
2) Maybe there is a third party component available that offers this functionality, setting virtual paths outside of web root or the config file I just mentioned in #1.
Any other solutions are also welcome.
cd "%plesk_vhosts%\"domain.tld\httpdocs
mklink /J point c:\outOfSpace
Now provide permissions to "psacln" group to c:\outOfSpace and that's it.
Also you can create "point" not in httpdocs but in web space root and than from Plesk create Virtual Folder inside /httpdocs with needed access permissions.
There is issue that your custom permissions may lost after Plesk upgrade, this KB article describe how your can avoid it kb.sp.parallels.com/111194

Can I migrate the installed OpenAM to another machine?

Thank you everyone in advance... ^^;
My manager asked me to migrate the installed OpenAM (already used) to another machine (newly obtained).
I tried to migrate it by file level.
(.openamcfg folder, openam folder, tomcat whole folder, ...)
But, after file migration... first access to /openam, it showed initial page(wizard) again. (no using installed configurations)
So, I should do first step. (amadmin password setting, and so on...)
Hmm... Is there any solution for pre-installed OpenAm instance migration?
If No, I can tell her there's no migration way.
Migrating the files should be enough, however you must make sure that :
The .openamcfg folder is in Tomcat's home folder
The file inside the .openamcfg folder contains a valid path to the openam folder
The .openamcfg and openam folders can be read/write by the user who runs the Tomcat service
The webapp context (the part of the URL after the server's IP address, typically /openam) stays the same
Also, when you copy the files, you must first properly stop the Tomcat service, especially if you use OpenAM's embedded datastore.

How to host multiple webapps using only 2 Virtual Directories

my shared hosting only allows me to create 2 virtual directories. and i want to host multiple webapps... say an asp.net mvc blog, a forum, a personal site etc...
isnt there any other way of doing this? cant i simply just ftp the blog folder to one of my virtual directories and then access it online??
For ASP.NET web applications, typically each would live in its own virtual directory which serves as the application starting point.
Technically you could "piggy-back" two applications on the same application starting point in one of two ways:
Put all the files for each application in the same directory (and appropriate sub directories)
If you don't have ANY files that overlap, you can get away with this. Of course, it's likely that you won't with such files as the default or index pages, etc. And this would be pretty messy anyway.
Put all the non-binary files for each app in an appropriate subdirectory and the binaries in the main virtual's \bin directory.
You'll be able to do this only if each application's binary files don't overlap by name AND there are no namespace ambiguity conflicts between assemblies (two different assemblies by file name, but with the same namespace). The latter is much less likely to happen if you are trying to piggy-back two different applications.
The big problem I see with the latter solution is that any parts of the application that make use of application root references will break. When some code tries to resolve a reference to some resource (like an image) based on an application root reference such as
~/images/logo.gif
the ~ will get resolved to the virtual directory, but will not include the additional (non-virtual and non-app starting point) subdirectory in which the application lives. So instead of this:
/vd1/app1/images/logo.gif
you'll end up with this:
/vd1/images/logo.gif
Obviously, that won't work.
So... you won't break either app if you can put them both in the same virtual directory, however, you'll have to check for file conflicts and such. Possible namespace conflicts will be unavoidable without separate application starting points.
Can't you just put each app in a separate subdirectory in either of the virtual directories. e.g. if you had http://server.com/vd1, you could partition it like http://server.com/vd1/app1, http://server.com/vd1/app2, etc.

Resources