jeudi 1 septembre 2016

nginx: [emerg] "proxy" directive is not allowed here

I installed PHP and Nginx webserver on OpenBSD 6.0. When I want to restart the webserver, I face an error:

nginx: [emerg] "proxy" directive is not allowed here in /etc/nginx/nginx.conf:76


where is the problem?

my nginx.conf :

#user  www;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
#error_log  syslog:server=unix:/dev/log,severity=notice;

#pid        logs/nginx.pid;

worker_rlimit_nofile 1024;
events {
worker_connections  800;
}


http {
include       mime.types;
default_type  application/octet-stream;
index         index.html index.htm;

#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
#                  '$status $body_bytes_sent "$http_referer" '
#                  '"$http_user_agent" "$http_x_forwarded_for"';

#access_log  logs/access.log  main;
#access_log  syslog:server=unix:/dev/log,severity=notice main;

#tcp_nopush     on;

#keepalive_timeout  0;
keepalive_timeout  65;

#gzip  on;

server_tokens off;

server {
    listen       80;
    listen       [::]:80;
    server_name  localhost;
    root         /var/www/htdocs;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root  /var/www/htdocs;
    }

    # FastCGI to CGI wrapper server
    #
    #location /cgi-bin/ {
    #    fastcgi_pass   unix:run/slowcgi.sock;
    #    fastcgi_split_path_info ^(/cgi-bin/[^/]+)(.*);
    #    fastcgi_param  PATH_INFO $fastcgi_path_info;
    #    include        fastcgi_params;
    #}

     proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
#        location ~ \.php$ {
     #   proxy_pass   http://127.0.0.1;
   # }

     pass the PHP scripts to FastCGI server listening on unix socket
    #
        location ~ \.php$ {
        try_files      $uri $uri/ =404;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;

    # fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}

}




Can we connect to an IPV6 enabled Web application from an IPV4 network?

My system is using an internet proxy that supports only IPV4.

I want to access a web application with IPV6 address:

http://ift.tt/2bE2djd**/

Is it possible?

Currently I am not able to access the GUI. Even I cannot ping to the IPV6 IP from CMD.

Can we access IPV6 web applications in an environment which supports only IPV4?




How can I save a web page in Redis cache for improving speed of website?

Is there any way to save the web page HTML in redis cache for further use and improving the speed performance.




Text Box data not showing in PHP

In PHP,, text is not showing when i type in textbox and click on submit,,, sorry for such a dumb question

<body>
<form action="process.php" method="post">
    Username: <input type="text" name="user" value=""/>
    <br>
    Password: <input type="text" name="pass" value=""/>
    <br>
    <input type="submit" name="submit" value="Submit"/>

</form>

</body>

Process.php is in external file

<?php
if(isset($_POST['submit'])){
    $username=$_POST['user'];
    $password=$_POST['pass'];

    echo $password;
    echo $username;
}

//echo $username." ".$password;
?>




fiddler not detecting android emulator http requests

I am using android studio emulator api22(lollipop) and Telerik Fiddler Web Debugger (v4.6.2.30081)

I have followed this to make fiddler detect android http requests from browser. But fiddler is not detecting requests even after following all the steps. Fiddler detects my normal browser requests.

But fiddler detects when i access the fiddler echo service => (10.0.1.12:8888) via emulator

I have tried

=> restarting fiddler and emulator

=>changing proxy address of APN to my local ip address and port to fiddlers port(8888)

=>setting options of fiddler as mentioned in the link.

=>turned off windows firewall for private networks.

Any help would be greatly appreciated!




Dynamic Form Architecture in Angular

This question is more theoretical in nature. I'm building a web application using Angular as the front-end and it will have hundreds of different forms with different number and types of fields, but generally I think I can generalize them into 4-5 different views. Right now, I create a new view for each and every form because the fields are different and the validations etc are different so in the end I would be left with hundreds of different views for the various forms alone, which is kind of a maintenance nightmare if I need to change the layout or structure. I want something scalable where I build 4-5 different views and then I can pass on 'parameters' defining the number and types of fields or something like that and have it create all the different forms I need. Is this possible? If so, where can I read more about it or how do I go about this. I'm new with Angular and want to understand the implications of building in this architecture.




mercredi 31 août 2016

What are the major scopes and limitations of a ONLINE RESERVATION? And What online reservation u preferred? [on hold]

A general answer at the first questions because i dont have idea yet on what online reservation should I do thanks

And please give some insights on what should i do