403 forbidden error in wamp after installing zend - wamp

My WAMP server started giving 403 Forbidden error after I installed Zend framework. Before that everything was working ok.
I have allready edited:
#onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
to
#onlineoffline tag - don't remove
Order allow, deny
Allow from all
and put the server online

if I remember correctly at least one of the Zend installs comes with an Apache and MySQL which it installs as well as the framework.
Are you sure you have not got wampapache the WAMP apache service name, and Apache the standard apache service name both running?
EDIT
To view services:
Press windows key + R
enter services.msc into the dialog that launches.

Related

WAMP Server - local server - 1 of 2 services running

I installed WAMP server and ran the applpication. The icon in the taskbar stays orange and says "local server - 1 of 2 services running" . Also, I am able to see the phpMyAdmin page in the browser but when I try to login it gives the following error:
#2002 - No connection could be made because the target machine actively refused it. <br />The server is not responding (or the local server's socket is not correctly configured).
I have tested port 80 and I got this response:
***** Test which uses port 80 *****
===== Tested by command netstat filtered on port 80 =====
Test for TCP
Your port 80 is used by a processus with PID = 6612
The processus of PID 6612 is 'httpd.exe' Session: Services
The service of PID 6612 for 'httpd.exe' is 'wampapache64'
This service is from Wampserver - It is correct
Test for TCPv6
Your port 80 is used by a processus with PID = 6612
The processus of PID 6612 is 'httpd.exe' Session: Services
The service of PID 6612 for 'httpd.exe' is 'wampapache64'
This service is from Wampserver - It is correct
===== Tested by attempting to open a socket on port 80 =====
Your port 80 is actually used by :
Server: Apache/2.4.18 (Win64) PHP/5.6.19
I believe that the above result means that there is no problem with the port. I even tried changing the port and still gives the same status - orange icon.
Note - When a prompt from Windows Firewall was shown after installing WAMP, I didn't give access to both private and public networks, i.e. I unchecked both the options.
Kindly help me to run both the services in the local server.
Thank you!
Click on the WAMP icon in the tray and go to Apache > service Administration and check if the service is installed or if it isn't running . You can even reinstall it by removing and installing it again. Do the same with MySQL . Go to MySQL > Service Administration and do the same things . In my case Apache service wasn't installed and Installing it did the trick. check the image below.
See this image
Most of the answers given on the Internet say to change the port used by Apache but that is not the solution in most of the cases.
Actually, start the WAMP server->right click on the icon -> tools -> use a port other than 3306 -> click on this -> set on 3308.
Hopefully, this will resolve the error.
I had the same problem but only Skype was using port 80. I just changed port 80 from Skype and make it use another one. OR you can change port 80 used by Apache. To do this go to WAMP -> Apache -> http.conf and change Listen 80 with Listen 81 for eg.
The same with me but in my case I installed mysql after installing wampserver so there was a port conflict between the integrated version and the independent version of mysql for the port 3306, so the problem could resolved either by changing one of ports
If you want to change wampserver's mysql's port go to the taskbar icon right click and the go to tools select: use a port rather than xxxx(3306 in my case)
This thread helped me.
How to change port number for apache in WAMP
Thread Details below
Just go to httpd.conf file, for ex. under WAMP environment its situated at:
C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf
go to line no. 46 and edit Listen 80 to your requirement for ex.
Listen 8383
newer versions of WAMP uses these 2 lines:
Listen 0.0.0.0:8383
Listen [::0]:8383
Next go to line no. 171 and edit ServerName localhost:80 to your requirement for ex.
ServerName localhost:8383
Restart Apache and its done !!
Now, you can access with your URL:
http://localhost:8383 or http://192.168.1.1:8383
Hope it helps to people looking for solution here.
No need to remove and reinstall WAMP or edit Host file or change any port. this problem happens when Internet Information Services (IIS) Manager service is running. you need just stop IIS to run wampapache service without any problem.
press start then type iis and run Internet Information Services (IIS) Manager and in right panel press stop. then click on wamp icon on system tray and choose start all services.
this is all you need.
I had the same issue some time back. Tried all kinds of things and finally found the link below. Basically the issue was:
A parameter in your 'my.ini' file (C:\Wamp\bin\mysql\mysql<version>) called 'lower_case_table_names'
If there, comment it out and restart MYSQL again."
If I recall, also did a computer restart also just for good measures.
http://forum.wampserver.com/read.php?2,136457
This might be because php is not working because the default port 80 is taken so u need to change the port follow these steps
1. Click the wamp icon from the bottom right corner
2. Go to Apache->httpd.conf and open this file
3. Search for word Listen in the file and change these two lines
Listen 0.0.0.0:8018 (u can use any digits instead of 18 )
Listen [::0]:8018
4. Now search for the word localhost and change this line
ServerName localhost:8018
5. Restart wamp
6. Go to your default browser and type http://localhost:8080/ this will open the wamp menu
It's either your WAMP Apache port is clashing with IIS (if that is installed and running), or MySQL port is clashing with another MySQL install.
Edit your WAMP > Apache > httpd.conf by hovering cursor over Apache inside WAMP tray icon. Change port 80 to an available port like 8181. Restart all services.
I had the same issue, where only 1 service out of 2 was running. But my issue was not a port issue.
I had previously zipped up a bunch of .conf files in the alias directory to share them with a colleague, and I left the .zip file there. This caused an error in Apache as it tried to use the .zip file as an alias.
Once I removed the .zip file from the alias directory, my Apache services were working fine.
Bit of an 'outside the box' answer, but this was my issue with the same symptoms!
Maybe it is not a port problem.
if you had a problem because msvcr110.dll is missing
so after you setup the library you will get this problem service 1 of 2
so in this case you have to reinstall the wamp server.
I had faced similar similar issue where the server was not starting up with the following message - "local server - 1 of 2 services running" , with server icon in Orange color.
With nothing updated in the error logs. Finally was able to track issue through -
Wamp server icon -> Apache -> Service Administration 'wampapache64' -> install service
Error message : WAMP - 'Your port 80 is actually used - Error'
Resolution : Change the port number of the wamp server to some other number,for example 5050.
Go to: C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf
In that file change the listen port to 5050.
#Listen 12.34.56.78:5050
Listen 0.0.0.0:5050
Listen [::0]:5050
Save and Restart. Now you can see the server started successfully with green icon.
Following threads helped me to resolve this issue :
How to change port number for apache in WAMP
WAMP - Your port 80 is actually used - Error
GO to run type Services and enter
check these two services must start

Access Django App on AWS ec2 host

This issue might seem very trivial but please try to suggest a solution for this if possible.
I have deployed a django App on AWS ec2 host and I am able to run the following command successfully.
(venv)[ec2-user#ip-xxx-xx-xx-xx abc]$ python manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
January 03, 2016 - 13:15:31
Django version 1.7.1, using settings 'abc.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
But I am not able to access http://127.0.0.1:8000/ from the browser.
On googling it's suggesting to use nginx or gunicorn. I am not sure if nginx, gunicorn etc. are to be used for this.
Can someone please let me know how can this be accessed from browser ?
Thanks,
You need to open HTTP port in AWS instance menu.(all ports except ssh closed in AWS)
Go to your console.aws.amazon.com, then pick your instance and go to last menu item "security groups". It lauch wizard, click on "Inbound" in bottom menu, then "edit", and add HTTP or any port what you want :)
And be sure you using your public AWS IP, to open in browser
Add some screen for you, hope it help:
In order to archive this all you need to do 3 simple steps.
Go to the EC2 Console and open up the security group of your instance. go to inbound tab.
click Edit and then press add rule...add entry with type of Custom TCP Rule and port 8000..
Go to your Django project,your app and open up the settings.py script. List your IPv4 address in the allowed_hosts section.. Ex : ALLOWED_HOSTS=['public IPv4']'
Now in the console run command python manage.py runserver 0.0.0.0:8000...
Open any web browser(from any device) and open the link 'public IPv4':8000
No need any app servers like Apache, NginX..
#Baterson is right. You should open port 8000 for your server first.
Official document is here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html . It is highly detailed.

Running apache bloodhound on apache2 web server

I am trying to run to apache bloodhound tracker on apache2 web server. I am using 0.7 version of the blood hound. I followed the website https://issues.apache.org/bloodhound/wiki/BloodhoundInstall
Blood hound is running on port 8000.
But the problem is I am not able to run the blood hound on port 80, so that if I hit bloodhound.mydomain.com, I should get bloodhound. I have mentioned my apache2 webserver setting file as specified in the website
/etc/apache2/sites-available/bloodhound
<VirtualHost *:8080>
WSGIDaemonProcess bh_tracker user=ubuntu python-path=/home/ubuntu/bloodhound-0.7/installer/bloodhound/lib/python2.7/site-packages
WSGIScriptAlias /bloodhound /home/ubuntu/bloodhound-0.7/installer/bloodhound/site/cgi-bin/trac.wsgi
<Directory /home/ubuntu/bloodhound-0.7/installer/bloodhound/site/cgi-bin>
WSGIProcessGroup bh_tracker
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
<LocationMatch "/bloodhound/[^/]+/login">
AuthType Digest
AuthName "ubuntu"
AuthDigestDomain /bloodhound
AuthUserFile /home/ubuntu/bloodhound-0.7/installer/bloodhound/environments/main/bloodhound.htdigest
Require valid-user
</LocationMatch>
</VirtualHost>
After adding the above file, its not running on either of the ports 8000 and also 8080 also.
How do I make it run. Kindly help me. By the way I am using ubuntu ec2 instance.
By golly I think I've figured it out! I've been stuck right about where you are on my own Bloodhound port configuration for days.
n3storm is correct: the whole magic of setting up mod_wsgi is that you no longer need to manually start bloodhound with that
tracd port=8080 /ridiculously/long/path/to/bloodhound/installer/bloodhound/environments/main
command. Instead, mod_wsgi runs all that python for you the moment your web browser requests http://[host]:8080/bloodhound, meaning your Bloodhound server is ready to serve the moment it's turned on.
The pain is how many interlocking config files are involved, and how many tiny things can break down the whole process. I don't really know python, I just barely understand Apache, and I'm 70% confident I've accidentally opened some gaping security that I don't understand, but here's my understanding of the mod_wsgi + Apache + Bloodhound domino chain. Paths are for my Apache 2.4 installation on Ubuntu 14.04.1 LTS:
1. You load http://[host]:8080/bloodhound
For this to work, I needed to edit /etc/apache2/ports.conf so that Apache is actually listening on port 8080. So add the line
Listen 8080
to /etc/apache2/ports.conf
Now visiting http://[host]:8080/bloodhound should at least show you something from Apache. For me, it was a HTTP Error 403: Forbidden page, and next up is my home remedy for the Error 403 blues!
2. Apache triggers bloodhound.conf
FULL PATH: /etc/apache2/sites-available/bloodhound.conf
Technically, Apache is looking in /etc/apache2/sites-enabled/ for a matching VirtualHost rule but you set this up by creating/editing .conf files in /sites-availabe/ and then activating them with the Apache command
a2ensite [sitename].conf
So. Apparently, Apache 2.4 changed its access control syntax for .conf files. So, to stop the Error 403ing, I changed
Order deny,allow
Allow from all
in /etc/apache2/sites-available/bloodhound.conf to
Require all granted
And then once again you should restart Apache with
sudo apachectl graceful
or
sudo /etc/init.d/apache2 graceful
or maybe
sudo service apache2 restart
I'm not sure, they all seem to work equally but I suppose the graceful ones are nice because they don't shut down your server or something important like that.
3. bloodhound.conf triggers trac.wsgi
FULL PATH: /ridiculously/long/path/to/bloodhound/installer/bloodhound/site/cgi-bin/trac.wsgi
After figuring out that ton of other things, I realized that, in the end, the default script that Bloodhound generates worked fine for me:
import os
def application(environ, start_request):
if not 'trac.env_parent_dir' in environ:
environ.setdefault('trac.env_path', '/usr/local/bloodhound/installer/bloodhound/environments/main')
if 'PYTHON_EGG_CACHE' in environ:
os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
elif 'trac.env_path' in environ:
os.environ['PYTHON_EGG_CACHE'] = \
os.path.join(environ['trac.env_path'], '.egg-cache')
elif 'trac.env_parent_dir' in environ:
os.environ['PYTHON_EGG_CACHE'] = \
os.path.join(environ['trac.env_parent_dir'], '.egg-cache')
from trac.web.main import dispatch_request
return dispatch_request(environ, start_request)
4. trac.wsgi serves up the HTML files for Bloodhound
Isn't the internet just magical?
By using Apache mod_wsgi you don't need Bloodhound running apart anymore. Is mod_wsgi what makes Bloodhound running. You should use standard apache port in this case.
Also, I guess you should use a ServerName directive at Virtualhost (or is it you only serve one host?)

Visit webpage hosted on ubuntu server in a local network

I have a ubuntu server hosting a web page driven by Python Django, I can access that page by using the following command:elinks http:// 127.0.0.1:8000.
Now if I want to access that same web page on a macbook sharing the same home router with my ubuntu server(local ip: 10.0.0.9), how would I do it? Typing in elinks http:// 10.0.0.9:8000 wouldn't work.
Thanks a lot,
ZZ
Are you running the development server using manage.py?
If so, you should start the server using:
python manage.py runserver 0.0.0.0:8000
This will allow the development server to be visited by ips on all interfaces instead of just localhost.
You need to serve it. There are a number of ways to do this, but my preferred method is to use Nginx as a reverse proxy server for gunicorn. This is a good tutorial for that.

Wamp server Forbidden [duplicate]

This question already has answers here:
WAMP error: Forbidden You don't have permission to access /phpmyadmin/ on this server
(35 answers)
Closed 9 years ago.
I installed latest WAMP 2.2d x64 on a new computer (no previous or uninstalled/reinstalled wamp versions).
Right after installation, running the wamp server and putting it online (else localhost is also forbidden) i try to open phpmyadmin.
I get an error:
Forbidden
You don't have permission to access /phpmyadmin/ on this server.
I dont know why that is happening. I havent changed ANY settings yet. On my other computer i run older version of wampserver, and as far as i remember, there were not any problems with running phpmyadmin or localhost after installation.
Thanks
Left click on the icon and then "Go online" (otherwise when you point at WAMP icon it says server offline although the icon is green)
wamp server might not be having permissions to access the phpmyadmin directory.
right click and run wamp server as administrator.
have you installed wamp and phpmyadmin in program files ?
If yes, I would suggest you to uninstall and install it directly under C: or somewhere else.
UPDATE:
Check this out.
WAMP error: Forbidden You don't have permission to access /phpmyadmin/ on this server
Following change is need to solve this problem
From the WampServer icon, left click, select Apache > Alias Directories > .../phpmyadmin/ > Edit alias to open the alias configuration file:
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
to modify following line(add ::1)
Allow from 127.0.0.1 ::1
again restart wamp check solve this.
Try changing localhost/phpmyadmin/ to 127.0.0.1/phpmyadmin/