Questions tagged [g-wan]
G-WAN is a web server with scripts in Asm, C, C++, C#, D, Go, Java, Javascript, Lua, Objective-C, Perl, PHP, Python, Ruby and Scala.
274
questions
-1
votes
1
answer
69
views
Trouble starting g-wan webserver on Ubuntu 22.04 LTS
I am working on Ubuntu 22.04 LTS, 64bit, Intel® Celeron(R) N4020 CPU @ 1.10GHz × 2, 4.0 GiB.
I downloaded G-WAN from http://gwan.ch/download today. unzipped the file (version unzipped : G-WAN 7.12.6 ...
0
votes
0
answers
104
views
How to configure ANSI C toolchain on Fedora 36 so G-WAN can compile and run C scripts?
I have unpacked gwan server, put a basic hello world file in a listener and tried to run it, however gwan won't run C scripts and claims that "ANSI C" is not installed:
$ ./gwan
allowed ...
0
votes
1
answer
180
views
multiple definition of main() function with gcc compilation in c
I'm looking for an efficient (fast and secure) method to communicate multiple scripts (and their associated main function ()) to each other. A bit like the principle of the G-WAN project which uses a ...
-1
votes
1
answer
279
views
Install HTTP/3 at G-WAN [duplicate]
According to you, is it possible to properly install the use of HTTP/3 on a web server such as GWAN ?
If yes, do you have an idea of ideal way to proceed ? I was thinking of using a quic lib (wich one ...
1
vote
2
answers
256
views
G-WAN - How to return Status Code: 200 OK if request URL = 541+ characters?
I'm using G-WAN Web App. Server v7.12.6.
How to return valid Status Code: 200 OK if request URL has a total of 541+ characters including the 25 parameters?
ajaxGet(URL, method) where method is GET ...
0
votes
2
answers
160
views
Using C# dll with G-WAN
My goal here is to apply create scripts that runs on G-WAN and connects to Azure Storage. So to achieve this, I am first trying out how to link dll to C# script in G-WAN and I encountered this error
...
0
votes
1
answer
347
views
How to add HTTP/2 in G-WAN
I would like to know if it's possible to make G-WAN 100% compatible with HTTP/2 by using for example the solution nghttp2 (https://nghttp2.org)
1
vote
2
answers
201
views
Can G-WAN servlets deploy ReactJS single-page-apps to browsers?
I'm developing several React SPAs and have not yet decided how the apps will be packaged/deployed/hosted.
Most of my experience is with back-end development, so I am not very familiar with methods ...
1
vote
1
answer
60
views
G-WAN C function xbuf_trunclen() and xbuf_truncptr()
I would like to use the xbuf_trunclen() and xbuf_truncptr() functions to cut my buffer but the functions do not seem to work.
Here's an example with an example running via char pointer:
char *string ...
2
votes
1
answer
319
views
How to write complex application to be used under G-WAN
I want to know the good practices when developing applications utilizing GWAN.
I have starter small app (but crucial part of big project) which will be utilizing C++ OOP. At least that means I have ...
0
votes
1
answer
133
views
G-WAN: adding .jar application to CLASSPATH: "try catch not catching exception"
I'm trying to use to G-WAN webserver. So I added a ".jar" application to CLASSPATH in order to call it from java servlet.
The code is running, but it is unable to catch the exception, and the ...
0
votes
1
answer
424
views
gwan v7.12.6 cannot show index.html
Visit 127.0.0.1/index.html responses 404 not found.
It is not because of file permission, since I followed the steps in gwan official site to set up the file permissions.
In the error.log, it show: ...
0
votes
1
answer
164
views
G-WAN v.7.12.6 content type handlers not work
I made a html.c script as below, in .../csp folder. It should output the additional headers with the default headers. But, actually it output the default headers only.
What have I done wrong? Did I ...
0
votes
1
answer
187
views
kv_do infine loop when when kv has more than 1 item
I have tried to use kv_t to store some data without success. I have also tried to the examples forum.c & kv.c. forum.c hangs when trying to create the second Forum thread while kv.c crashes.s.
...
1
vote
3
answers
266
views
Linking another library from C-library in gwan/libraries results in "undefined symbol" error
I'm trying to use a standard library libuuid inside my C-library file my_uuid.c:
gwan/libraries/my_uuid.c:
#include <uuid/uuid.h>
#pragma link "uuid"
void my_uuid_generate(uuid_t uuid)
{
...
1
vote
1
answer
121
views
kv_do() not working as expected
This is in my init.c:
server_data_t **data = (server_data_t**)get_env(argv, US_SERVER_DATA);
data[0] = (server_data_t*)calloc(1, sizeof(server_data_t));
kv_t *channels = &data[0]->channels;
...
1
vote
1
answer
62
views
Why get_env(US_VHOST_DATA) is NULL on first invocation of main() in handlers/main.c
I'm using G-Wan v4.12.31.
Does anybody know why get_env(US_VHOST_DATA) returns NULL on first invocation of main() in handlers/main.c?
int init(int argc, char *argv[])
{
u32 *states = (u32 *)...
0
votes
1
answer
341
views
G-WAN v7.12.6 can't visit the static contents
G-WAN out-of-box is running no problem with the dynamic contents but can't visit the static contents.
I ran G-WAN with kk user(not root, no sudo). All files and directories are of kk user/group.
I ...
0
votes
1
answer
164
views
G-WAN v7.12.6 is not listening
I was using G-WAN v7.12.2, everything is OK. But when I changed to G-WAN v7.12.6, it started without error but I can't visit my site. When I use Linux command
"sudo netstat -tnlp"
to check, there ...
1
vote
1
answer
368
views
G-WAN for Rapsberry Pi3?
This question is for the G-WAN development team.
I know that you've discontinued G-WAN 32-bit due to the very low demand of G-WAN for the Linux 32-bit platform.
But, with regard to both the ...
1
vote
1
answer
200
views
Where to place the robots.txt file with G-WAN?
I want to disallow robots from crawling the csp folder and plan to use the following robots.txt file:
User-agent: *
Disallow: /csp
So, my question is double:
Is the syntax correct for G-WAN?
With ...
1
vote
1
answer
211
views
How to add a new language (compiler) to G-WAN?
Is it possible (and if yes, how) to add new compiled languages to G-WAN such as Free Basic (fbc) and Basic 4 QT (Q7BCompiler) which both provide complete IDE and build Linux executables?
TIA.
3
votes
1
answer
177
views
Is it possible (and how) to change the way G-WAN proceed requests?
Today, G-WAN proceed requests like this (sample using the loan.java servlet):
localhost/?loan.java&name=Eva&amount=100000&term=5&rate=4.2
Could a specific handler (or even better a G-...
1
vote
1
answer
74
views
Glitches with report.c and report.java servlets on gwan 7.12.6
This is a question sent to the gwan development folks.
Using the last gwan release 7.12.6 (with my Mint 17.3 system), both the report.c and report.java servlets don't display the System Uptime ...
0
votes
1
answer
423
views
To run G-WAN, you must fix the error(s) or remove this Servlet
I am using gwan 7.12.6 on my Ubuntu Server 14.04.4 LTS and I start it with the command sudo service gwan test that is equivalent to the command sudo ./gwan (so not in deamon mode).
Then, all the ...
0
votes
3
answers
134
views
Why does report.c say I'm listening on port 80_80 and have less Cores than available?
Environment
I'm running G-WAN on Ubuntu 14.04.3 SERVER LTS (3.19.0-49) 64-bit with a CPU Intel Core i7-3610QM using the TCP port 80.
There's the 0.0.0.0:80 folder but no 0.0.0.0:8080 nor any 0.0.0.0:...
0
votes
2
answers
95
views
xbuf_repl is not replacing all occurences
As g-wan documented, xbuf_repl is replacing all occurrences. But my installed g-wan, running the following code, only replaced the first occurrence of the matched.
#include "gwan.h"
int main(int ...
-1
votes
2
answers
192
views
With the last G-WAN 7.12.2 where is the 32-bit x86 version?
I'm running different 8-10 year old machines (both Intel and AMD with dual core cpu) on native Ubuntu 32-bit but with only 2 Gb of RAM (today DDR and DDR1 are rare and expensive).
With such low end ...
0
votes
1
answer
131
views
Reading a POST payload from a G-Wan C Script
I understand that reading actual query string params is made easy with the get_arg function. However, I am not seeing anything in the examples or documentation that will let me read the POST payload. ...
0
votes
1
answer
104
views
gwan v7.12.2- files in www folder can't be visited when with query string
for example:
http://123.456.789.123/page.html, 200 OK
http://123.456.789.123/page.html?, 404 not found.
http://123.456.789.123/page.html?debug, 404 not found, too.
0
votes
1
answer
89
views
gwan v7.12.2 mime type handlers not work
I made a handler html.c in folder of handlers
#include "gwan.h" // G-WAN exported functions
#include <stdio.h>
int main(int argc, char *argv[ ])
{
char header[ ] =
//"...
0
votes
1
answer
158
views
What's wrong of my permission settings in G-WAN v7.12.2 - cannot visit the pages in www, but scripts in csp ok
My file permission setting as following:
All files and directories rwxrwxr-x kklou kklou, including www and csp having the same settings, but only the scripts in csp can be visited.
I did study the ...
0
votes
3
answers
520
views
G-WAN, NodeJS, and Streaming
Does G-WAN spin up a new NodeJS instance for every user request? (i.e. if you're using JavaScript for a servlet) For instance, if 100 users request an action at the same time that's handled by a ...
0
votes
1
answer
89
views
G-WAN 7.12.2 segfault when not ran as a daemon
I have ran a fresh install of latest G-Wan as not daemon (e.g. ./gwan).
I request some files (also tried nonexistant files) - all OK.
I request /? (no file name, just '?') and I get a segfault and ...
0
votes
1
answer
199
views
G-Wan v 7.12.2 how to `completely remove the "Server: G-WAN"` and more
I've downloaded the latest G-WAN. I installed and ran successfully ph7.
How (what var should I use) if I don't want to reveal the server's identity?
I couldn't find LG_PH7 in the gwan.h file, is it ...
2
votes
1
answer
508
views
How to configure G-WAN to use php-fpm?
As title said, how to configure G-WAN to use php-fpm?
Currently using lighttpd with php-fpm. Heard G-WAN maybe even lighter, want to give it a try. But after downloading the package and have it ...
1
vote
1
answer
150
views
What are the exit status codes for the G-WAN executable?
I'm trying to serve a big number of small files with G-WAN (version 4.3.14, started with sudo on 64-bit Ubuntu 14.04.3). I start hammering it with requests over a single connection using wget to ...
2
votes
1
answer
349
views
GWAN as embeded server for spring boot
not sure if this is possible but was wondering if its possible to embed GWAN in spring boot app (like tomcat/jetty etc.) are. and how so?
0
votes
2
answers
616
views
Where is the configuration file in g-wan?
Where is the configuration file (init.d) in g-wan. Also how do I get rid of the '?' In the url to run php or c script ( I think you need to change this in the configure)?
4
votes
2
answers
2k
views
How to set and read cookies using C and the G-wan web server
In php you would set a cookie by doing
Setting new cookie
=============================
<?php
setcookie("name","value",time()+$int);
/*name is your cookie's name
value is cookie's value
$int is ...
1
vote
1
answer
2k
views
How do you include a HTML file in c
I am currently using g-wan for myweb server and would like to know How do you merger multiple HTML files, in c for HTML?
In php I t would be
<?php include('/path/to/file.php');?>
How would you ...
0
votes
2
answers
1k
views
Gwan or nginx for php
I have large photo file and would like to use gwan as it fast. Is there any performance benefits in comparison to nginx fast-cgi. Does gwan fast at timd to first byte? Is it faster at connecting time? ...
4
votes
2
answers
3k
views
API gateway for WebSocket
I need a API gateway for my websocket application.
Analyse and identify unusual requests from certain IP
Quotas and Rate Limiting
Statistics
Free or commercial
Solid performance
The sub-protocol of ...
2
votes
1
answer
242
views
Replace url in html files on load balance basing on geolocation?
I have a HTTP web server providing static html pages.
Within the page, it loads images & css from a fixed domain like:
<img src="http://assets.mysite.com/1.jpg" />
Actually there are ...
3
votes
3
answers
690
views
connection gwan with aerospike db in C
Hello.
First I'm sorry for my ita-english.
I want use gwan with aerospike but when run the servlet...problem.
I start with this example.c of aerospike. In file example.c I put gwan.h and this is the ...
1
vote
2
answers
267
views
GWAN: How to read cookies using php
read about that gwan shall support global variables as $_GET, $_POST and $_COOKIE, but $_COOKIE won't work?
How is it possible to read them?
thanks
0
votes
1
answer
97
views
Effective subscription to data feeds
How to effectively implement subscription mechanism in G-Wan? Suppose, I want to make g-wan aggregate data from various tickers and farther process it. And, obviously, every feed provides the data in ...
0
votes
1
answer
264
views
g-wan error unknown SIGSEGV
I have problem using g-wan. When try to download large file, I got this error message :
Signal : 11:Unknown SIGSEGV problem
Signal src : 128:.
errno : 0
Thread : 1
Code ...
1
vote
1
answer
1k
views
How to use gwan with wordpress installation through php-fpm?
Is there an easy way to use wordpress through php-fpm using gwan?
Any use case, example of this to share?
1
vote
1
answer
346
views
G-WAN C script with hiredis example
Has anyone integrated redis with a G-WAN C script? I can't seem to get the properly linkage of the libraries of hiredis working on centos linux.
Will appreciate if someone has done that... (...