FAQ Database Discussion Community


JDBC connection validation performance using auto-commit, meta-data or table?

java,jdbc,webserver,connection-pooling
All, I have been researching connection validation options on several web server technologies. They are Iplanet 7 (aka Sun One Webserver) Apache Tomcat 7 Glassfish All these servers provide JDBC connection validation however in their documentation I cannot find any specifics about what type of query is used for connection...

Best practice for docker webserver, muliple layers or single layer?

webserver,docker
I want to build a docker webserver, serving Nginx, PHP and MySQL for multiple websites. Would it be better to run a single docker container for each component, ie one for MySQL, one for Nginx, One for PHP and another for my site data. Or Run multipul containers that each...

Generating Http 301 Response Message

java,webserver,http-status-code-301
I'm trying to create a little web server and have be able to generate Http response messages 200, 301, and 404. I am able to get 200 and 404 to work, but I am having problems with 301. When I try to access a page that has "permanently moved" my...

Include js file in Go template

jquery,go,webserver
I started learning Go recently. I got a sample like as web app. I have: /* tick-tock.go */ package main import ( "fmt" "io/ioutil" "log" "net/http" ) // Content for the main html page.. var page = `<html> <head> <script type="text/javascript" src="http://localhost:8081/jquery.min.js"> </script> <style> div { font-family: "Times New Roman",...

Typecast an integer formatted as a string with 'json.loads()'

python,json,webserver
I have a JSON response from a web server that wraps integers in quotes which effectively turns them into strings when loaded with Python's json module. Is there a smart way of casting all integers and floats automatically upon json.loads() or afterwards? Example data: { u'qualityIndicators':{ u'reviewIndicator':{ u'activeReviewCount':u'229', u'activePeriodInDays':u'365', u'reviewsCountedSince':u'2009-02-18',...

Upgrade SonarQube issues

service,jenkins,webserver,sonarqube,sonarqube-5.0
I'm having issues installing my instance of SonarQube 4.4 to 5.1. The instructions say to stop the SonarQube server, match up a couple files (back up DB, copy plugins, etc.), and then restart the sonar server for the updated version. My problem is I'm not sure how to start/stop the...

how does Tomcat or any webserver handles requests and dispatches responses?

tomcat,servlets,webserver
This might be a simple questions. But I am looking for low level details which I dont find a clear answer for. I have a simple jsp form with a name field on it. I post my name to the form and the servlet returns with the response "Hello Matt"...

Replace nodejs for python?

python,node.js,webserver
i'm working in a HTML5 multiplayer game, and i need a server to sync player's movement, chat, battles, etc. So I'm looking for ways to use python instead nodejs, because i have I have more familiarity with python. The server is simple: var express = require('express'); var app = express();...

Nginx rewrite rule without changing url

linux,url,nginx,webserver,rewrite
I need rewrite rule for my nginx server without changing the url. For example : The following link http://example.com/old/path/index.php?cid=XXhhHHnmmm to become : http://example.com/newpath/index.php?cid=XXhhHHnmmm and to point in that specific folder (/old/path). till now I've tried the following which is working if I try opening _http://example.com/newpath: but not working if I...

Why can a web app prefer one webserver over another?

php,linux,apache,nginx,webserver
According to these System requirements, then Typo3 recommends Apache over nginx. This am I surprised about, as I would have expected that all webservers have the same abstraction layer. Question How can an application prefer one (Linux) webserver over another? Or is this just one of those cases, where the...

nginx limit_req does not work

nginx,webserver,rewrite,rate
I'm trying to implement a simple rate limiting system with nginx (v1.6.2) sites-available/mysite.com: limit_req_zone $binary_remote_addr zone=myzone:10m rate=2r/m; server { listen 80; server_name mysite.com; root /var/www/vhosts/mysite.com; error_log [..]; access_log [..]; include conf.d/php-fpm.conf; location = / { limit_req zone=myzone burst=3 nodelay; index index.html; } location / { try_files $uri =404; } location...

How to do housekeeping in jetty?

java,webserver,jetty
We let users upload some image files to our webserver. These files are of no use 10-15 mins after uploading. Is there any way to automatically delete these files e.g. all image files which have 'expire' in their name 15 mins after they were created?

A web server to store files with unlimited bandwith [closed]

php,unity3d,webserver,server,dropbox
I've recently started an android app (using Unity) and users will need to upload a (~200kb) file somewhere, and have another user download it later. I was planning to use Dropbox as they have a 20gb daily bandwith allowance, but I can't find a way to upload files to my...

What is the best (and most cost effective way) to run automated server operations on a certain day or time by it self?

amazon-web-services,amazon-ec2,webserver,bigdata,analytics
I am using a load balancer (and server) to start other servers to run large database updates and analytics, etc. I am paying quite a bit for running servers. I assumed this enterprise solution would cost quite a bit but I think I might be doing things a little differently...

Script to download a web page

linux,bash,webserver
i made a web server to show my page locally, because is located in a place with a poor connection so what i want to do is download the page content and replace the old one, so i made this script running in background but i am not very sure...

Execute action in web server without client request

ruby,webserver,sinatra
I am working on Sinatra single purpose application which is making api calls to some service. I would like if server could perform that action at predetermined time and have results stored for client when requested. Right now I refresh only on user request as: class App < Sinatra::Base get...

Do files on your server influence website speed

apache,webserver
If you have a webserver for your website, does it make a difference if there are a lot of other files on the server, even if they aren't used? Example An average webserver has a SSD with 500 GB of space. It's hosting a single website, but has a ton...

Web Server/Web service written in C++ in Linux

c++,linux,web-services,webserver
The requirement is to have Linux machine without additional installations aka Java, apache tomcat/jboss, that will be able to serve as a web server and to accept web service request (I will have to write some web service in C++ that will serve under this web server). So, the question...

Uploading a website to a server [closed]

php,phpmyadmin,webserver,localhost,server-side
Usually when you have xampp, wamp and lamp your php files and databases are stored on your local machine and not the actual server so how would you move a finished project with its database from localhost to your server?

Node.js + express.js and thread safety

node.js,multithreading,express,webserver
Assume I have an array of items and each GET call make a change on this array (may be add/remove/shift) Would that be "thread-safe"? I know that Node.js is a single-threaded, yet is there a possibility that two GET requests would be handled "simultaneously"?...

HTML interface for a python program running in loop

python,process,webserver
I'm new in python development. I have a program for control some sensors (I/O) that is running in a loop While True:. I would like to create a web page where I could see some values, some variables from my program. Searching on the web, I found many info but...

Application Server and Web Server on Two Different Machines

webserver,application-server
Today I'm hosting a Laravel v4 web application on a MacMini. Why a Mac? Because I created the application logic in Objective-C (leveraging my experience with iOS dev). Whether or not this was the right choice isn't the point of the question. What I'm interested in knowing is how can...

File ownership of created files

php,nginx,permissions,webserver,ownership
I have 2 php applications running on my server and the files within these applications are owned by 2 users (user1 and user2) The ownership of the files look like this user1:www-data and user2:www-data. I assign www-data as group so my php application can easily write to the files when...

Deploy python web server on AWS Elastic Beanstalk

python,amazon-web-services,websocket,webserver,elastic-beanstalk
I'm deploying an python web server on AWS now and I have a some question about it. I'm using websocket to communicate between back end and front end. Do I have to use framework like django or flask? If not, where should I put the index.html file? in other word,...

Given 2 URLs, is it possible to know if the resources are on the same web server?

url,webserver
I am accessing 2 URLs. The domain name/server part is the same. The resource part is different. The URLs are like the following: https://aa.bb.com/dir1/dir2 https://aa.bb.com/dir3 When I access the first URL, I get redirected to the second URL. Is it possible that the second URL be hosted on a different...

Raspberry Pi with c++ running thread, publish data on web

c++,webserver,cgi
I would like to show some values handled in my c++ program on a web page, this should be opened from many clients and the web page should be not mandatory for my application. I described these requirements because I getting crazy to solve this issue: I found many samples...

php-cgi environment variable setup

php,c++,post,webserver,cgi
I'm building a small web server in C++, and I'm trying to add support for POST requests for PHP pages at the moment. However, I don't know how I should pass the POST request body to the PHP executable. I've seen some examples where environment variables are set and php-cgi...

How can I create a webserver in C which supports PHP pages?

php,c,sockets,webserver
First of all, I know to create web servers which deal with static html pages. I want to create a web server which supports PHP pages. I have coded a server like below, -> main() function just create a socket, accept a request and calls connection(fd) function. int main(int argc,...

How to localize content on a java tomcat webserver?

java,web-services,tomcat,localization,webserver
I have inherited remote content and i would like to localize it. I am looking for the best architecture or if there is a easy logic to get it done in java that would be great. Here is the issue: In my mobile app to retrieve content from a remote...

php upload smaller image version of original

php,image,upload,webserver
I'm new to php and I've managed to get uploading images working to my webserver. Now I'm looking for a way to also upload a smaller duplicate version of the original image to my webserver. For example the original image that is uploaded is image1_timestamp.jpg I also want the same...

GZIP compression on HTTPS traffic security issue with BREACH/CRIME attacK?

security,ssl,webserver
For example when I have a look on the HTTP header of https://www.facebook.com I see that they utilize GZIP compression Content-Encoding: gzip with SSL/TLS traffic. Isn't that a bad idea because of BREACH/CRIME attack? curl -I -H 'Accept-Encoding: gzip,deflate' https://www.facebook.com HTTP/1.1 200 OK Pragma: no-cache Cache-Control: private, no-cache, no-store, must-revalidate...

With golang webserver where does the root of the website map onto the filesystem>

go,webserver
Where is the filesystem "root" of a golang webserver. It doesn't seem to be in the directory the executable is in. By "root" I mean the directory I would use for, say, the src attribute of an img, without any path. I don't plan to do this, but it would...

How can I prevent circular http requests in a network of servers?

python,http,webserver,web.py,circular-reference
I have a web.py program acting as a web service, delivering responses according to the files in its directory. Now I want to build a network of servers, each running an instance of the program. Additionally, each server has a list of addresses to other servers. The motivation behind this...

How can I read a CSV from Webserver using c# with LINQ? (ClickOnce deployment)

c#,linq,csv,webserver,clickonce
Hello I'm very new to coding but I developed a tool which works for local use. My Boss wants me to put it on our website for customers. I figured out ClickOnce is a way to do this. The .exe is reading a .csv file to find data for use:...

Encryption in an open-source program?

node.js,security,ssl,encryption,webserver
Currently I'm developing a Node.js webserver-app that I then want to make available for download and use. This app should feature accounts, so that you can log in with your account on the website created by the server. Since that would require a password, I also have to think about...

Is Apache enough to prevent unauthorized access?

web-applications,php,webserver,apache
I've just been assigned to finish the development of an application which has user restricted access. The original developer was a co-op student, as am I. After looking over his code it seems that the user only ever accesses index.php and the other php pages are called with an Include...

Linux - Difference between transferring files and creating them - Permissions

html,linux,apache,permissions,webserver
I am running an Apache web server on a machine running Centos. THE PROBLEM: When I run the server, everything works fine and I can see the welcome page. The problem occurs when I try to put in an index.html file I previously created into the /var/www/html directory. When I...

Why is my site loading so slowly, and how to 'minimize request size'?

html,webserver
I just found out that I should expect my site to get a bunch of traffic today. Great! But it's loading incredibly slowly! According to Pingdom, the most important fix would be to minimize my request size http://tools.pingdom.com/fpt/#!/jT4ro/radionowhere.net What does this mean and how do I start fixing it?...

SonarQube web server goes down after three days

timeout,webserver,sonarqube,offline
Installation: SonarQube 5.0 MySql-5.6.23 My question is about SonarQube web server: When the SonarQube web server isn't used for more than three days and I try to reach my SonarQube web server after this time, I get the error message: "We're sorry, but something went wrong. Please try back in...

Pubnub Access Management with Python

python,django,webserver,real-time,pubnub
I am trying to use Pubnub Access Management with Python by I always get an error message saying that the 'Signature Does not Match'. I know their documentation says that this means that the Secret/Publish/Subscribe keys may be wrong but I have triple checked that they are correct. Also checked...

How do I configure my Android emulator to access my localhost?

php,android,android-emulator,webserver,localhost
I am attempting to change my Emulator's Network Address to 10.0.2.2 so that I can test it using PHP stored on my localhost, because 127.0.0.1 is the emulated system's own loopback interface, not the one running on my host development machine. My systems knowledge is limited, so what part of...

TCP Window Update Scenarios

networking,tcp,webserver
In our application, we are using apache tomcat webserver running in 8081. It receives POST message from Client at 16:42:06.87 IST timeframe. It acknowledges by ACK packet with window size of 62356 bytes after 200ms. After some seconds (3-5 seconds), it also sends similar ACK packet but as a "TCP...

While scaling up, how to make user uploaded files available accross multiple servers?

webserver,sync
I have a website in which users would upload various and later access them. The files are stored in a specific path in the server at this point. Now if I need to have multiple servers for the website, what is the best way to make the user uploaded files...

Accessing a web server on a Mac Virtual Machine from the Mac Host and Network

webserver
Initial Config The host machine is OS X 10.10.2 The Virtual machine is a OS X 10.9.5 Tomcat v7.0 server (java servlet) is running inside the virtual machine. While on the VM, I can access the website on localhost:8080. Steps I followed a myriad of different guides, but they all...

files access access deneid

php,webserver
Hi have this code to manage my main page. Everything works fine on my local server at home,i'm using easyphp. But on my webhosting server i got this error Warning: scandir(D:\Hosting\12067690\html/,D:\Hosting\12067690\html/) [function.scandir]: Access is denied. (code: 5) in D:\Hosting\12067690\html\index_menu.php on line 65 Any ideas? thank you in advance. <?php $dir...

Uploading file to apache server in C (without web headers)

c,apache,file-upload,webserver,apache-modules
I'm developing webserver (Apache 2.4 in linux) and trying to support file upload from client side to server side. I succeed to receive the file in server side, but I'm getting an extra web headers in the uploaded file content which I want to omit. For example, I when uploading...

How to test java server without deployment?

java,webserver,client-server,server,web-deployment
Is there a way that I can test my java server on my computer without deploying it to a real server? I know php had wamp and lamp but what about java?

How to prevent timeout when running a time consuming PHP

php,timeout,webserver,long-integer
I use PHP that gets so many data from several sites and write those data to the server which make files greater than 500 MB, but the process fails in between giving a 500 INTERNAL ERROR, but to adjust the timeout time of the php so that the process runs...

How can I send bandwidth of client to server?

cookies,webserver,webclient,server
Is there away for server (web-server of web-page or file server) to know what bandwidth client had during last access or during page/file request? Can this information be sent via cookie or together with page/file request? I guess this is more of theoretical question, since I want to know if...

Serving static HTML files in Nginx without extension in url

apache,nginx,webserver,httpserver
root directory = /srv/myproject/xyz/main/ in the "main" folder I have few *.html files and I want all of them to point at a url say /test/ (which is quite different from the directory structure) this is my very basic nginx configuration server { listen 80; error_log /var/log/testc.error.log; location /test/ {...

How to block directory by htaccess but allow for my site over GET

.htaccess,webserver
I've got 2 servers - web server and data server, where are all my uploaded files. Is there any option in htaccess to block all access in data server, but allow for requests from that web server? Example: web server: portal with videos, audio,... and data server, where are all...

Java TCP Simple Webserver Problems with response codes (homework)

java,http,tcp,webserver
This is an assignment for a course we are having and i need some help. I am having problems for example, trying to request a file that does not exist, it works that a 404 file not found page comes up, but when i look in the web tool for...

Authentication required on raspberry pi web server

authentication,webserver,raspberry-pi,mongoose-web-server
I'm trying to send some JSON data to a webpage via mongoose on my Raspberry Pi. I'm sending the data to port 8080 on the pi itself, but when I navigate my browser to localhost:8080, it asks for authentication. What is my authentication supposed to be?

Block index.php everywhere except in the root directory with .htaccess

php,regex,apache,.htaccess,webserver
I have a folder structure like this: subdir |_ subsubdir |_ index.php |_ other_stuff.php |_ images |_ pic.jpg .htaccess config.ini index.php Content of the .htacces file: Options +FollowSymLinks -MultiViews -Indexes Order Deny,Allow <FilesMatch "(\.ini$)|(\.php$)|(^\.)"> Deny from all </FilesMatch> <Files index.php> Allow from all </Files> My goal is to keep users...

When a friend sends me link it sometimes doesn't work like in his computer?

http,url,webserver,httprequest,httpresponse
I read somewhere that it's because the URL doesn't contain the body of the HTTP request. Is it true? If so, can someone please explain? Thanks!...

How web server send data to web browser over network?

sockets,networking,webserver
I want to know how web server can reach to client which is behind the router? When i tried connect to ip of my friend i didn't success (we are not in local network), and when web server try to send data over network to him it success. How ?