Nuxtjs Deployment on a server - apache

i have worked on a project and i want to deploy it on my server.i used Nuxtjs(Vuejs) as a Front-end and Drupal 8 as Back-end(Headless CMS).
The issue is i uploaded the cms files on the server, now the CMS files is on
DOMAIN.COM/cms
and uploaded the Nuxtjs files on the root
DOMAIN.COM
the project is working fine on
DOMAIN.COM:2000/
and the CMS is working fine, how can i make it work on
DOMAIN.COM/
i tried alot with ProxyPass but i got the Nuxtjs working but the CMS is not.
can you please help me?
thanks

the question is not clear
CMS files is on
DOMAIN.COM/cms
and uploaded the Nuxtjs files on the root
DOMAIN.COM/cms
are in the same folder???...
why don't you just place your drupal server in a subdomain, like api.misite.com and your nuxt application in the main domain misite.com and make requests to the api subdomain.
almost always using subdomains instead of folders can free you from headaches with colliding apache configurations, you just have to determine if your hosting allows you subdomains (probably yes)...hope this help you

Related

Moving Symfony from development to production

I have made some web sites using Symfony 4 that work using the PHP server on my local machine.
When I FTP the Symfony project-directory to my 1and1 Linux web host I can not get the web sites to show up in my browser. I have tried to implement the guidelines on the Symfony documentation for doing this.
In the example below I used the symfony-demo project. I did the following:
composer create-project symfony/symfony-demo
this looked fine on my browser running on the PHP server on my local machine.
composer require symfony/apache-pack
Edited .env: APP_ENV=dev to APP_ENV=prod. Added the code from Apache with mod_php/PHP-CGI on Symfony website to .htaccess:
<VirtualHost *:80>
ServerName domain.tld
// etc etc
</VirtualHost>
Used FileZilla to upload symfony-dir (over 11000 files) to 1and1 server
Looked at www.my-web-sites/symfony-demo
I just get a page with adverts which is what happens when there is nothing there.
The symfony-demo directory is there and has files in it according to FileZilla
I know I am quite a long way from understanding this and there may be several issues I need to address but googling and reading the documentation does not seem to be taking me forward at this point. Any pointers would be great.

Correct Apache Configuration And Htaccess

I've just reset my Ubuntu 14.04 LAMP server hosted with digital ocean. Could someone tell me the 'proper' way to do server configuration. My goal is to do everything as clean as possible (and hopefully well structured).
I intend on using the server mainly for programming and data analytics, however I do plan on hosting my website in /var/www/html. I also plan on using letsencrypt/certbot to get an easy SSL. With this in mind, these are the main goals I would like to accomplish:
1) Redirect the website to ALWAYS be served through https AND www.
2) Enable HSTS for the entire website.
3) Enable clean url's (remove .php extensions and what not).
Since I would like all of these properties to be used across the entire website, should the configuration be done inside of the /etc/apache2/ folder? Or should it be done inside of .htaccess?
And if it should be done inside of apache2 configuration, which file should I add it to? And finally, how exactly should it be added? (for example vhost 80/443, inside of a mod_something section, etc).
Thank you in advance, I would appreciate and consider any advice about Apache and htaccess!

MediaWiki on Subdomain (.htaccess rewrite)

I am using an Apache Server (cant config apache root files) and running my core website (Invision Power) in the root domain "example.com". We decided to expand our services with a wiki using MediaWiki which is installed and can currently be reached on "example.com/w/".
I am utterly noobish with .htacess and Rewrite Conds/Rules and looking for help! We want our wiki to be access via wiki.example.com - and this URL should NOT change in the adressbar. Each page (wiki.example.com/Main_Page) should be accessed like this.
Please keep in mind that we want our core website keep working as it did for years now. So example.com and any other folders should not be affected by the Rewrite Rule.
Can someone please help - do you need any further information??
THANK YOU SO MUCH
Best Regards

Migration to VPS w/Plesk

I had a shared hosting package with 1and1 and I just moved over to their VPS hosting that uses Plesk. I already had the domains moved over the VPS server and I already uploaded all of the files via FTP.
I talked to an agent yesterday and he helped me setup the main page on the website so that it would go to the appropriate root directory. The main website is working properly whenever I go the main domain name, however, whenever I go to website.com/blank or website.com/stuff, I receive a 404 error.
The strange part is that I see the files in Plesk file manager, I just don't know why they are not displaying properly. I didn't change anything in the migration process.
I did not change the code on any of the pages and I have contacted their customer support team a number of times, but they have been unable to resolve the issue.
Can anyone tell me what I should do to make sure that the files are associated with the correct pages?
Have you checked the permission for the files and folder under your domain, this seems to be an issue with either your ownership or permission of the files. And if thats not the problem it could even be your .htaccess file.. make sure you have transferred your .htaccess file as well from old shared hosting to new VPS.

Apache - hosts file point subdomain

I have a site I developed locally for a client. They have an existing live site (at www.livesite.com). I want to move the developed site to their server, but I want to test it on their server before it's live.
I thought I'd install the site in a sub directory on their server (www.livesite.com/dev), and then using my hosts file, make my browser think it's viewing the final live URL (www.livesite.com).
However, I've tried various combination of things in my hosts file, and I can't seem to get it to work. The server ip followed by the domain / sub-domain.
I'm running on MAMP on OSX. Anyone have experience with this?