Creating virtual host in ubuntu 18.04 - virtualhost

I m trying to create virtual host in my ubuntu 18.04 for my laravel project and i had installed xampp as well but there is no any apache2 folder created in my /etc folder so that i cant find sites-available/ folder
How to create virtual host in that case?

You can check this link and follow the given simple steps :
How To Configure Apache Virtual Hosts In Ubuntu 18.04 LTS
If ant any point you find any difficulty please let me know, I will try my level best to provide solution.

First of all, you'll have to install a Lamp Stack. You can follow this guide for it.
Then you can use this other guide to set up an Apache Virtual Host.
Note: You don't need Xampp at all.

Related

Apache Virtual Host Configuration

I am using Apache 2.4 on Raspbian and I want to create a virtual host to serve files on my external hard drive on my website. I searched it on the internet and found many guides to make it but this seemed the simplest: http://www.thegeekstuff.com/2011/07/apache-virtual-host/
However, the files "httpd.conf" and "httpd-vhost.conf" which are mentioned in the guide do not exist in my system (I searched the whole system). Therefore I can't configure those files and hence, my virtual host. When I was searching the information about location of https.conf on the internet, I learnt that it does not exist anymore. However, I couldn't find the information about what to do in this situation.
I have been searching it online for hours but I couldn't find the answer. I do not know how to set up my virtual host. I would greatly appreciate your help.
Debian derivatives keep their config files in /etc/apache2/
To create a new virtual host, create a new config file in /etc/apache2/sites-available/. You can use 000-default.conf as a template (but you'll need to add ServerName directives as you'll be creating a specific default host rather than the fallback).
Then run a2ensite YOUR-CONFIG.conf to turn it on, and service apache2 restart to restart the HTTP server so it picks up the new configuration.

Running apache in an ubuntu Docker container on a RedHat machine

I am new to Docker and have been trying to configure a standard default install of Apache2 running on the ubuntu:14.04 image.
This seems to work just fine when the Docker host machine is running Ubuntu, but when I try to run this same config on a machine running RHEL 6, I get apache config errors having to do with file permissions. Specifically, the default apache page returns a 403 forbidden page.
I thought the point of Docker was that I could create a container on one environment and it should behave exactly the same on any other environment.. am I way off?
Not 100% sure, but it may be that you need RHEL 7. From here you can:
docker pull rhscl/httpd-24-rhel7
See https://access.redhat.com/solutions/1378023

Unable to find httpd directory in Amazon EC2 to configure PhpMyAdmin

I am new to amazon servers. I have Installed PhpMyadmin in my Amazon EC2 server. To access my server's PhpMyadmin from my PC it seems I need to configure some files. According to this link I need to change the file /etc/httpd/conf.d/phpMyAdmin.conf But there's no directory or file named 'httpd' in /etc directory. Where can I find the httpd directory? How can I configure my machine to access phpmyadmin? I almost tried every solution in stackoverflow and none of them worked for me. Any help is appreciable.
First you need to configure web-server on your ec2 instance. You can install apache as a webserver.
For RHEL/Amazon/Fedora Distro issue following commands:-
sudo yum install httpd
Then make changes in /etc/httpd/conf.d/phpMyAdmin.conf according to the Link you are using and restart the apache web server.
sudo service httpd restart
You can access PHPMyAdmin by http://ec2-ip-address/phpmyadmin
For Ubuntu/Debian Distro issue following commands:-
sudo apt-get install apache2
Then make changes in /etc/apache2/conf-enabled/phpmyadmin.conf according to the Link you are using and restart the apache web server.
sudo service apache2 restart
You can access PHPMyAdmin by http://ec2-ip-address/phpmyadmin

Ubuntu 10 Apache Virtual Hosts suddenly missing

I have a bunch of apache virtual hosts set up on an Ubuntu machine. They were working for a long time and now they're not:
$ a2ensite /etc/apache2/sites-available/somesite.com
ERROR: No site found matching /etc/apache2/sites-available/somesite.com!
What could I have done wrong? This is happening for all virtual hosts on my machine. They are all there under /etc/apache2/sites-available/ but apache doesn't seem to see them.
You should use a2ensite somesite.com.

Accessing local apache server from virtual box

I have apache installed on my machine. And I have windows xp installed on virtual box in the same machine. Can I share apache between them?
I'm running a virtualbox with w7 on wxp. On the host (wxp) i'm running a local apache install.
I can access the host apache install from the guest system using ip 10.0.2.2.
I've added an entry to the guest hosts file (windows/system32/drivers/etc/hosts) pointing the domain i want to test to the ip above. Thus:
10.0.2.2 www.domainname.com
From my guest w7 system i can now access www.domainname.com, which is now served from the local apache on my host system. This works including mysql db support on the host.
I found the ip number in this thread: https://forums.virtualbox.org/viewtopic.php?f=8&t=44068
Hope this helps.
yes but you have to configure the network of the XP VM to "Bridge". Then you can access your Apache server on the host machine with the browser on the XP VM (http://192.168.0.24 for example). Both the host and the VM are on the same network then.
What do you mean "share"? If you've got an apache installation on your main system, you can browse to pages served by that installation.
If you've got a virtual machine with windows XP on it, and its own apache installation, that is a seperate installation. You can do port forwarding to that virtual machine, so you can access that too.
For instance, you can have have Apache 1 (main system) running on port 8112, and Apache 2 (virtual machine) on 8113, etc...
I guess you could put htdocs in a shared virtualbox folder, so you can update site contents from both systems, but they still would be served by seperate apache installs.