Access Wamp 3.2.3 Virtualhost from another local pc - wampserver

So I am trying to access a virtual host called myproject I have given it a server name... The issue is that I can access the Wampserver 3.2.3 interface from a external pc using the server's local ip address. Then if I click on the virtual host that I am trying to access it says "Could not connect"
I have edited the following in the hosts of the local pc
192.168.10.129 Servername
This is my httpd-vhosts.conf
<VirtualHost 127.0.0.5:80>
ServerName floki
DocumentRoot "c:/wamp64/www/vtigercrm"
<Directory "c:/wamp64/www/vtigercrm/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
I have tried changing the 127.0.0.5 to a * but with no success. If someone can please help as soon as possible as I have hit a brick wall.
Please note that I am using wampserver 3.2.3 There is not put online or $suppress_localhost in index.php

it's may be late, but it could help someone else!
I think you should change the flag AllowOverride from None to All.

Related

local project of wamp server won't loaded if we accessed from internet

Anybody here can help me to fix my problem.
I already setup wamp server and we wanted to access from internet the problem is we can access only the main directory of wamp which is www and when we access the project it won't load because it send request to the local ip of the server not the forwarded domain.
Please we need some advice.
Hey!
1. Set up a Private Network for your PC (ex: 192.168.0.111)
2. Forward Ports(NAT Port) on your Router (Port Ex: 5577)
3. You need to register Free DNS
You must make sure to the steps on, edit the correct files below:
httpd.conf
Listen 192.168.0.111:5577 Listen [::0]:5577
ServerName yourDNS:5577
< Directory />
AllowOverride all
Require all granted
< /Directory>
#onlineoffline tag - don't remove
Order Allow,Deny
Allow from all
Require all granted
"${INSTALL_DIR}/cgi-bin"
AllowOverride all
Order Allow,Deny
Allow from all
Require all granted
httpd-vhosts.conf
VirtualHost *:5577 Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
4. Go to [C:/Wamp/alias/], change as image of the attached for you:
https://i.stack.imgur.com/I5Rcz.jpg
Done!

Passenger (Apache) on EC2 not loading Rails application when arrive via DNS

This is driving me nuts. Hopefully someone can help
I've deployed a Rails app on an EC2 instance (Ubuntu) using Apache and Passenger. Here's my Apache configuration on the EC2 instance
/etc/apache2/apache2.conf
<VirtualHost *:80>
ServerName ec2-52-16-160-160.eu-west-1.compute.amazonaws.com
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /home/ubuntu/workspace/intellitute/public
ErrorLog /home/ubuntu/workspace/intellitute/log/error.log
RailsEnv development
<Directory /home/ubuntu/workspace/intellitute/public>
# This relaxes Apache security settings.
AllowOverride all
Require all granted
# MultiViews must be turned off.
Options -MultiViews
</Directory>
</VirtualHost>
This works and I'm able to access the application by putting ec2-52-16-160-160.eu-west-1.compute.amazonaws.com into a browser.
I've registered a domain name with a provider (not AWS) and set up two 'A' DNS records there (appname.com & *.appname.com) to point at the public ip of my server - 52.16.160.160.
I've then changed the ServerName in the conf file above to the domain name I registered and restarted the Apache server.
<VirtualHost *:80>
ServerName www.appname.com (also tried 'ServerName appname.com')
.....
But when I type www.appname.com into a browser I'm just getting the Apache2 Ubuntu Default Page. I'm assuming the fact I'm getting the default page means the DNS is working but for some reason Passenger is not loading the application? Is this assumption correct?
Does it make a difference that I'm still working in the development environment?
I'm stuck and can't find any solution.
Thanks for looking
Edit 1
I'm not at my development machine at the moment but does it make a difference that I haven't set up an elastic IP address on my EC2 instance? I'm just using the public IP address provided by the instance. I'll try set one up later to see what happens.
Finally figured this out. Might help someone in the future.
My EC2 instance was a clone of another and I reckon there was some issues with the apache2 and passenger configurations. I uninstalled and re-installed them on the EC2 instance and it is now working (for appname.com, not www.appname.com - I'll have to figure that out)

Middleman server and apache on cloud

I have a ruby on rails application which runs on Middleman Server. I installed that application in windows azure ubuntu virtual machine. After completing installation once i started my server by giving this command "middleman server" my application is running well. After that i have installed apache web server for that application by following this procedure
http://nathanhoad.net/how-to-ruby-on-rails-ubuntu-apache-with-passenger
but im getting this error after completing the above procedure
"it works! this is the default web page for this server. the web server software is running but no content has been added, yet."
Please help me how to install a webserver for a ruby on rails application which normally runs on middleman server.
You said you have Apache installed, there's your web server. And if you installed Passenger you have an application server for your Rails or Middleman. Check out the Phusion Passenger users guide, Apache version. I followed that to set up. Are you trying to view the src as you work or the build after you run middleman build? What are you building, a Rails or Middleman app/site?
I have been messing around with different approaches for Middleman Development setups. I ended trying a few different configurations and documented them in a Gist. Scroll down and there is some info on my Passenger version, I'm very new to MM and that was the first time I tried Passenger, so please take that into consideration. I think the trickiest part was that Passenger requires a public folder, but Middleman doesn't use a public folder at all. I think the Passenger with Middleman has a few more 'gotchas' over the other approaches. Check out the 3.0 in my Gist.
My vhosts file looks like this:
# Testing Middleman Development Approaches #3 with Passenger,
# note the public folder is used to serve the src directory
<VirtualHost *:80>
ServerName mm_passenger.loc
DocumentRoot /Users/davekaplan/mm_passenger/public
ServerAlias mm_passenger.loc.*.xip.io
<Directory /Users/davekaplan/mm_passenger/public>
AllowOverride all
Options -MultiViews
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName mm_passenger.build
DocumentRoot /Users/davekaplan/mm_passenger/build
<Directory /Users/davekaplan/mm_passenger/build>
AllowOverride all
Options -MultiViews
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I'm on Mac running Apache and Passenger. I did a virtual host (path to site files) to the Apache /etc/apache/extra/httpd-vhosts.conf file and the domain to my /etc/hosts file.
Don't give up!
Dave

Rails 3 Two Applications on Different Domains (same ip) with Apache?

I deployed using phusion passenger on apache2 intially with just my single Rails application onto a domain, say bar.com. Now I wish to push an additional app I recently created to a subdomain on the bar domain, say foo.bar.com. I was a little confused about how I should setup the virtualhosts in the httpd.conf file to allow for this setup. I setup my DNS through godaddy so that the new subdomain would point to the same ip address as the initial domain (they're both residing on the same server).
Here's the VirtualHosts in my httpd.conf file (notice the two document roots points to different applications):
NameVirtualHost *:80
<VirtualHost *:80>
ServerName bar.com
ServerAlias www.bar.com
DocumentRoot /home/me/app1/public
<Directory /home/me/app1/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName foo.bar.com
ServerAlias foo.bar.com www.foo.bar.com
DocumentRoot /home/me/app2/public
<Directory /home/me/app2/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
With this setup I can navigate to www.bar.com or bar.com but it seems the subdomain doesn't work, navigating to foo.bar.com leads me to this page:
Not Found
The requested URL / was not found on this server.
Apache/2.2.20 (Ubuntu) Server at foo.bar.com Port 80
This involved a couple of steps. Firstly I moved my virtualhosts outside of my httpd.conf file and create to new files under the sites-available folder each named after the corresponding domain bar.com and foo.bar.com. Next I had to add each site to sites-enabled by running the apache command sudo a2ensite. Finally I had to call the command sudo service apache2 reload. It's important that each command was run with admin access or else it didn't work.
Also worth mentioning, browsers like Firefox like to cache old website domain name data so if the url foo.bar.com previously wasn't working and you resolve the problem it will still appear to not work until you clear your cache.
Did you remember to restart apache after adding the second virtual host?

How can i see my apache rails server from other computers on my local network?

I have an apache server running, with mongrels underneath running rails. The apache config file for my rails app looks like this:
<VirtualHost *:80>
ServerName trunk.production.charanga
ServerAlias max.trunk.production.charanga
DocumentRoot /home/max/work/e_learning_resource/trunk/public
RewriteEngine On
<Proxy balancer://mongrel1>
BalancerMember http://127.0.0.1:5010
</Proxy>
# Redirect all non-static requests to thin
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel1%{REQUEST_URI} [P,QSA,L]
ProxyPass / balancer://mongrel1/
ProxyPassReverse / balancer://mongrel1/
ProxyPreserveHost on
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# Custom log file locations
ErrorLog /home/max/work/e_learning_resource/trunk/log/error.log
CustomLog /home/max/work/e_learning_resource/trunk/log/access.log combined
</VirtualHost>
I thought that this would let me access it from another computer with max.trunk.production.charanga, but there's another step i'm sure, that i can't figure out. At the moment, if i type my ip address into the address bar in firefox on another computer, i see the default apache server (with "It works!" etc), but i can't get to my rails apache server. Please correct me if i'm using the wrong terminology here...
thanks
max
The computer attempting to access it needs to know how to resolve the DNS entry max.trunk.production.charanga to the correct IP address 192.168.1.42 (or whatever is the IP address of your server). It cannot figure this out without being told.
You can usually tell it this information by editing /etc/hosts and pointing that address to the correct IP address. Just simply having Apache recognize the name doesn't allow your other machines to know how to access it.
Alternatively, if you run a local DNS service, you can add an entry there.
Editing of your hosts file is a quick and easy solution.
Adding the line
192.168.1.1 trunk.production.charanga max.trunk.production.charanga
to it will tell your computer to use that ip for that domain. Depending on your browser (Firefox does caching internaly) or your OS (windows caches as well), you may need to restart your browser or flush your dns cache.
For more information about your hosts file (including where to find it on different OSes), check this wikipedia link.
I think it just simple,
I always do like this. example . 200.100.10.1:3000/ . I access my friend web application in another city.
or
<VirtualHost>
DocumentRoot /htdoc/trunk/ <-- this is my app path. I move my rails app into xampp for exp
ServerName 200.100.10.1:3000
ServerAlias 200.100.10.1
</VirtualHost>
so I just type 200.100.10.1 to access their application if i'm not wrong. I hope it work
I found the answer: the solution is to make the required server the default server for my ip address. I did this by changing the top of the config file for the required site (/etc/apache2/sites-available/001-trunk in this case)
from this
<VirtualHost *:80>
ServerName trunk.charanga
ServerAlias max.trunk.charanga
DocumentRoot /home/max/work/e_learning_resource/trunk/public
......etc
to
NameVirtualHost 192.168.0.234:80
<VirtualHost 192.168.0.234:80>
ServerName trunk.charanga
ServerAlias max.trunk.charanga
DocumentRoot /home/max/work/e_learning_resource/trunk/public
.....etc
where 192.168.0.234 is my network ip address.
Now, when someone else enters that ip in a browser they get the site i want them to get instead of the apache default site.
Thanks everyone for your advice!
type in the ip and port like so:
127.0.0.0:80/rails
this will only work if permissions are set to read/write.

Resources