WIX + LAMP under one domain - apache

I’m trying to get my head around a problem and hoping for some clarity
I have built a basic LAMP site running on a VPS.
My client also has a site built on WIX (online website builder)
I would like to get both sites running under the one domain name. Perfect solution would be (though I don’t believe is possible):
example.com - WIX
example.com - WIX
example.com/y - LAMP
example.com/z - LAMP
My next idea would be to use subdomains:
www.example.com - WIX
xyz.example.com - LAMP
Is any of the above possible when trying to work with WIX and LAMP setups without spending lots of money on something like nginx? Or do I just have to use different domains?

I am not familiar with WIX ecosystem but I think that the path of least resistance is to just setup a subdomain using DNS records.
Refer to your DNS manager, but basically you just want to add an A record.
Your DNS records might look like
example.com. A 1.2.3.4
www.example.com. A 1.2.3.4
So you will just need to add
xyz.example.com. A 5.6.7.8
If your DNS records are managed by WIX, I found the proper documentation.
By the way, Nginx open source is free. Nginx plus is a paid service that includes some goodies on top. Blog post Feature comparison

Related

Google Domain forward to Digital Ocean linux server, running Apache2 subfolder, and display domain as root

I've been googling for a bit now, and I really cant seem to figure this out. I recently bought a domain name with google domains, that I wish to point to a sub domain on my web-server, (example) http://120.0.0.0/sub-folder/, while apearing as domain.com.
Right now I have mbektic.com forwarding to http://138.197.5.88/mbektic/ which kind of gets what I need done, but I wish for the URL to say mbektic.com, instead of the ip address of the server.
Now I've been looking around and I've found things mentioning things from creating records to .htaccess files, and honestly I'm completely lost.
If someone could point me to a straightforward guide or give me a list of steps to follow, I can do it myself, but currently I am just lost.
This really belongs on unix.se since it isn't programming...
That said, what you need to do is set up a DNS A record pointing your domain name to your IP address. Add a second one to handle www.example.com
Then, on the webserver, configure it to respond to that name and serve content out of the directory you specify (the apache webserver calls this the DocumentRoot - you may want to look up apache virtual hosts .... )

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!

Trouble setting up a subdomain on a VPS under Ubuntu and Apache

I'm a complete newbie when it comes to servers, so I need some help. Basically, I want to have a subdomain on my VPS. I'm not too concerned where the files reside, though of course I would like them separated if possible.
I found a guide to doing this that basically sums the procedure up in five steps:
Create directories to host the content of a new virtual site.
Make a copy of the /etc/apache2/sites-available/defaults file with a site appropriate name.
Change the two /var/www/ entries to the actual directory of the new site.
Add the ServerName line with the real domain name you will be hosting.
Use a2ensite to enable the new site, and finally reload Apache2 so it knows about the new site
I tried all of this, but I can't get it to work. I didn't get any errors at any point during this process, but when I enter the address with the subdomain into my browser, I get a "Server not found" error.
The company that hosts my VPS has an admin page where I can set up subdomains. Stupid question: do I have to do reconfigure the DNS records or something while doing this, or is it likely that the problem is caused by something else?
Additional note: I followed a guide on howtoforge.com when setting up the server, which in hindsight may not have been the brightest move on my part. It is possible that I made a mistake there that is somehow affecting me now?
Assuming you've setup the subdomain correctly in your VPS' admin page, the only thing left to check here is that you've actually created the subdomain in your DNS administration page (have you?). For example, I use afraid.org to manage my DNS records and to add a subdomain, it's essentially:
Type: A
Subdomain: sparky
Domain: example.com
Destination: 120.34.2.3 (this would be your VPS' IP address)
In general, you add a (sub)domain by:
sparky.example.com A 120.34.2.3
Please keep in mind that you want to add an A record (this is important!).

Magento multiple stores, same installation, 3 checkout, 3 domains, 1 hosting: how to install SSL?

I have read about everything about this situation and had very different recommendations and read many differents scenarios from 2007 to 2010. But nothing exactly like my case even here on stackoverflow, so I'm here to ask the real experts. Considering this:
website1.com
- hosting: simplehelix
- domain name: simplehelix
- main magento installation (1.3.2.4)
- SSL installed
- paypal PRO (credit card taken directly on this site)
website2.com
- hosting: none
- domain name: goddady
- DNS/nameserver: to simplehelix servers
- folder called /website2/ that loads magento
- paypal PRO (credit card taken directly on this site)
website3.com
- hosting: geohost
- domain name: geohost
- DNS/nameserver: to simplehelix servers
- folder called /website3/ that loads magento
- paypal PRO (credit card taken directly on this site)
All 3 sites share most of the same products (80%) because they are 3 real physical businesses from the same owner having mostly the same products. They use one Magento admin for products, categories, customers, sales.
QUESTION: Now, in 2011, I'd like to know exactly what is the simplest, easiest, fastest way to have SSL on website2 and website3 so that all our transactions are secured? Can I just buy SSL on godaddy and geohost and install it there on the domain names and it will work even if the DNS is pointing to simplehelix? Do i have to reinstall magento on 2 new hosting plans + ssl and not be able to share same database?
Note:
- we do not want to share carts
- we want people to stay on the respective websites
- we want to use paypal pro
- keep cost down
- please be clear on your steps/description, as this might help many other people more/less technical
Thank you for your help
Joel
I'm not sure how you've had different recommendations. The answer is simple: you'll need to buy an SSL certificate for each of your domains that you want secured.
Sharing a Magento installation, talking about the DNS, etc, is not relevant.
Buy the SSL certificates, get your webhost (it looks like you're using SimpleHelix for hosting all of the websites) to install them all for you, then change the secure URL in the Magento admin for each of your stores (use the dropdown in the configuration area to change the configuration scope from Global to each store in turn) to the appropriate URL, presumably https://www.website{1,2,3}.com from http://www.website{1,2,3}.com.
Easy :)
Sounds like you need to think of Magento terminology 'stores' or 'websites' - with 'stores' you can have lots of them on the same SSL, sharing the same checkout. However, if you have built your sites with 'websites' then you cannot have them all go to the same checkout and you will need multiple IP addresses.
It is relatively simple to move your hosting to a VPS that supports more than one IP address, although check before you leap. It is also possible to move your 'stores' to a single 'website' in Magento.
Ok, it seems that the easiest way to do this was to buy 2 new hosting accounts at my hosting provider and then buy SSL on both and ask them to redirect to the Magento installation. It worked, but it cost 2x hosting account that I do not use at all...

Configuring Mass Virtual Hosting + SSL on development machine

Is there a way to use this, or something like it, for SSL enabled hosts?
VirtualDocumentRoot /www/vhosts/%0/public
I want to avoid having to configure Apache every time I start working with a new domain on my development box. It would be nice to just add a directory, follow standard naming conventions, and be able to automatically access the site with HTTP or HTTPS.
I realize this definitely isn't the route to go for a production server, but it should be ok just for development.
One example came pretty close using mod_rewrite, but it still requires updating a configuration mapping file when you add a host (which I'm trying to avoid).
http://sweon.net/2008/01/hosting-multiple-ssl-vhosts-on-a-single-ipportcertificate-with-apache2.
Any ideas?
Thanks
The author of the article I referenced above was nice enough to come up with a solution.
This is working on Apache 2.2:
RewriteRule ^/(.*)$ /var/www/%{HTTP_HOST}/htdocs/$1 [E=VHOST:${lowercase:%{HTTP_HOST}}]