wamp server locally denied? - wampserver

I have just installed Wamp Server 2 to my pc. and I cannot access phpmyadmin, or even index.php at root directory, it all gives 403 Forbidden.
I have also tried to change permission from alias.conf it did not work.
Do you have any idea how to solve this, or any offer is worth to try, please share.
Thanks in advance.
PS: OS: W7, antivirus KasperSky, windows firewall off.
EDIT: restarting wamp solved phpmyadmin access but directory access (ie: http://localhost/index.php) is still forbidden.
EDIT2: I can now access my index.php through the url: 127.0.0.1/index.php but I cannot still access http://localhost/index.php and I shall use http://localhost/
EDIT3: Logs are full of :
[Fri Apr 13 20:50:06 2012] [error] [client ::1] client denied by server configuration: C:/wamp/www/
[Fri Apr 13 20:50:19 2012] [error] [client ::1] client denied by server configuration: C:/wamp/www/

See my old guide here, many of my friend has this error and this guide works http://www.hieule.info/site/web/solve-the-denied-access-problem-when-using-wamp-server-2-on-windows-8- Hope this works for you too.

I'm planning to use wampserver on windows 8 to run a local only server. I fixed this problem by editing Apache httpd.conf like Trung-Hieu Le (cf.), but only changed one line :
Change
Listen 80
To
Listen 127.0.0.1:80
#Listen 80

This problem with apache configuration. Go to httpd.cong file and replace line number 46 to Listen 127.0.0.1:80. This worked for me.

If it was a firewall problem, you wouldn't even get a 403 error, you'd just get "site is unreachable" from your browser. Check the server error log, it'll explain exactly why it you're getting the error.
I'm guessing it's due to a mis-configured default document with directory browsing disabled - e.g. you've got an index.php in there, but Apache's only looking for index.html by default. With directory browser disabled, you'll get a 403 Forbidden.

chnage localhost to 127.0.0.1 and should work , i had smiler problem :)
::1 - - [11/Nov/2012:14:29:34 +0330] "GET / HTTP/1.1" 403 202
127.0.0.1 - - [11/Nov/2012:14:29:37 +0330] "GET / HTTP/1.1" 200 6051

I had that error and it was caused by having inadvertently deleted the C:\Wamp\Apps folder. Tripped me up because I would have expected a 404 in that case, not a 403.

The simple and most effective sollution in my case and to what I suppose in most of the other cases is all about the access:-
Just follow the following simple step:-
Just Open your httpd.conf file, over there you will see the following
onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Just Change the Deny from All with Allow from All and save the changes and restart all your services in the Wamp server
(Change above with the following)
onlineoffline tag - don't remove
Order Deny,Allow
Allow from all
Allow from 127.0.0.1
No need to change your port or anything else.
Simple and 100% effective
Hope it help others aswell

Go to C:/Windows/System32/drivers/etc/hosts
add a new line with: 127.0.0.1 localhost

Related

unicorn production configuration

I see my unicorn error file growing, and I can't find out why.
It log some path but when I try them on my browser, I don't see any issue neither redirection.
I'm using rails and this is a snippet of my unicorn production conf file:
stderr_path "log/unicorn.error.log"
stdout_path "log/unicorn.log"
One line from the error log file:
xxx.xxx.xxx.xxx, yyy.yyy.yyy - - [16/Mar/2019:20:13:54 +0100] "GET /fr/yyyyyyy HTTP/1.0" 200 - 0.0926
I thought 200 means that it was OK, but why do I see HTTP/1.0 when my site is only https?
More over, why do I get all those log entries when all the reported errors are working correctly for me?
Is there a way to format log so that I can get more info on error?
HTTP/1.0 is the protocol, this does not imply that your site is not using HTTPS.
By default, the Unicorn logger will write to stderr. So these are not errors, just logs of requests coming in.
Refer this for unicorn configuration options and their meanings - https://github.com/phusion/unicorn/blob/master/examples/unicorn.conf.rb

403 Error after upgrading passenger (for nginx) is keeping me up at night...where did I go wrong?

I think I've read every question and answer on SO related to passenger/nginx and 403 errors, but none have lead me to a solution, so here I go...
I had Nginx (1.0.6) with Passenger (3.0.9) running beautifully for a rails app for many, many months with no real issues. Tonight I decided to upgrade from Passenger v3.0.9 to v3.0.12 to take advantage of a new feature. After running the install according to the provided instructions (using RVM), I went to the URL served by my rails app and got the dreaded 403 error. The nginx log file first had me thinking it was a permissions error:
directory index of "/home/SimfoUsers/public/" is forbidden, client: , server: , request: "GET / HTTP/1.1", host: ""
But after checking every possible permission, I no longer think that is the issue. I think the problem is actually that passenger is somehow not actually running, and the page is being served as a "normal" webpage by nginx. This is supported by the fact that if I add an index.html file to my rails public directory (/home/SimfoUsers/public/), nginx serves up this file as one would expect. Also, if I run passenger-memory-stats, ZERO passenger processes are running. Shouldn't nginx automatically spawn passenger processes whenever needed, or am I completely missing something here?
Here are the relevant parts of my nginx.conf file:
http {
passenger_root /usr/local/rvm/gems/ruby-1.9.2-p290#Simfo/gems/passenger-3.0.12;
passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.2-p290#Simfo/ruby;
...
server {
listen 80;
server_name simfo.info www.simfo.info;
root /home/SimfoUsers/public;
passenger_enabled on;
}
}
Basically the only thing that I changed from my previously working config file is to update the passenger_root and passenger_ruby directives to reflect the new version of passenger (3.0.12). So if this is a config file issue, I'm really at a loss to understand it...
I'm not sure whether to just delete this question, or leave it in case it can save someone else the same frustration. This definitely is a face palm moment...
In desperation, I finally rebooted the server. After that, everything worked fine. It seems that at some point the passenger-related processes died and were not re-spawned automatically. One would think that after a fresh installation and reboot of nginx, passenger would be restarted, but apparentally this is not the case. My only advice to anyone having a similar problem is to issue a ps aux | grep passenger (or tasklist on Windows?). You should see one or two processes related to passenger. If not, then something strange is going on, and a reboot might help you as well.

Rails/Nginx: 403

I'm getting a 403 error on my new rails testing page: removed.com:8080. I installed RVM as root, and everything seems to be running correctly (with my limited knowledge of Ubuntu...).
Here's what my log is reading:
2012/03/26 21:53:33 [error] 11698#0: *2 directory index of "/" is forbidden, client: 150.182.203.216, server: rails.pixelcraftwebdesign.com, request: "GET / HTTP/1.1", host: "pixelcraftwebdesign.com:8080"
What am I doing wrong?! :( I've googled this for about 4 hours...
You're attempting to list directory and it appears that .htaccess/server is restricting this. Go to the actual controller/action as per your routes.rb implementation (e.g. pixelcraftwebdesign.com:8080/home/index if you have home_controller and it has index method inside)
Most likely you don't have the correct permissions set on your home or web directory.
Make sure that you have 755 permissions set throughout your path, to allow the non-privileged user that nginx is running as to traverse your directories and read your files.
Some Linux distros will automatically set restricted permissions on your home directory :
/home/user
As a security precaution to prevent other users from reading your files.

Error 403. Wamp Server

I have installed wamp server 2.2
I'm using windows 7
When I am online at that time i'm not able to find localhost using WaMp
its giving me some Forbidden Error..You Don't have Access kind of error.
But when I disconnect my internet connection, I can get localhost..PHPmyadmin and all feature of WAMP server.
I tried a lot by changing the Apache httpd .conf to Replace All..."Deny all" to "Allow all"but still, i'm not able to get it online.
Putting server online in contect menu did not help me. If you are using Wamp server 2.2E you will find the lines in your httpd.conf file
# onlineoffline tag - don't remove
Require local
Change them to to
# onlineoffline tag - don't remove
Require all granted
This solved my problem.
Cut and paste:
Error 403 Forbidden with phpmyadmin and WAMP Server
Error 403
-----
Forbidden
You do not have permission to access / on this server.
Edit the Apache configuration file httpd.conf and find the lines:
# onlineoffline tag - don't remove
Order deny, allow
Deny from all
Allow from 127.0.0.1
Change them to:
Order allow, deny
Allow from all
It works.
You can change 127.0.0.1 to ::1 or change Deny from all to Allow from all in the httpd.conf file. I have a blog about this error on Windows 8 at http://www.webtrunghieu.info/site?p=21
You may also have a .htaccess file within your www directory which is causing this error. Be sure to check that.
Go to C:/Windows/System32/drivers/etc/host
find the
"#127.0.0.1 localhost"
line and uncomment it by removing the # sign
It is possible that you get an 'access denied' message even when you are logged in as an administrator.
To work around that, right click on your file editing software and click run as administrator.
You should be able to save the file then
Localhost should work just fine after that.
I tried solutions posted here, but did not work to get wamp 2.2 started on windows 8 machine. This link from wamp server forum solved issue. I needed to change "Listen 80" to "Listen 0.0.0.0:80" in httpd.conf file. This may be an issue specific to my machine but the solution worked like a charm.
just need put your wampserver online
in tray right-click on wamp icon and Put Online

"502 Bad Gateway" with passenger

I am using rails(2.3.10)/passenger(2.2.15)/nginx(0.7.67) , when i run my application, it give me "502 Bad Gateway" and without any production log, my conf file is :
1 server {
2 listen 80;
3 server_name www.why.bz;
4 root /usr/local/apps/why/pro/public;
5 access_log /usr/local/apps/why/pro/log/access.log;
6 passenger_enabled on;
7 }
who can give me some tips, thanks!
I've done Rails deployments full-time for the last couple of years, so hopefully I can help. You've probably figured this problem out by now, but here are some questions to think about for next time:
Since this is a Ruby on Rails application, can you tell where the error is coming from: Nginx or Rails itself? That sounds more like a Nginx issue, but it would be good to know. A quicky peek into the Rails production.log or Nginx's error_log should elucidate this info.
How are you connecting to the application: web browser or command line? Is the IP and hostname set correctly (try the Linux "dig" command to verify)? Are you trying to hit http://localhost:80 ?
There are error log commands that nginx takes that could be configured to help you debug the issue (much like the access_log line): http://wiki.nginx.org/CoreModule#error_log
Lastly, verify the permissions that are set on your web files: The nginx web server needs to be able to access them. At least "read" permissions are needed.
Good luck,
Harmon
change it to
listen 443;
it could be as simple as that.
It could be that your secret key base is missing for the required stage.
One thing that I sometimes forget, especially if I don't start with a staging environment and then add it later, is to add the following to my secrets.yml file:
staging:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
This is telling Rails to get the secret_key_base value from the environment variable, SECRET_KEY_BASE. You must specify this variable by placing this in your nginx configuration:
passenger_env_var SECRET_KEY_BASE yoursupersecretkeybase;
If you don't have a SECRET_KEY_BASE, you can generate one with:
bundle exec rake secret

Resources