It's working, but is it a good or bad design?

hiya
I hope I�m not breaking any forum rules, but any help would be greatly appreciated.
I haven�t really done any programming so far, so finally writing an app with more than few lines of code was something different. Anyways, I managed to write it, but truth be told, I have no idea whether my design choices ( I�m not sure if that�s the right term ) were somewhat good or completely off. Thus, if I don�t know what parts of program are designed badly ( and why they are considered bad), then I won�t know where to improve. So I�m hoping someone could point out ( at least the most obvious )design mistakes I made.
It�s a simple �chat� server where several clients ( up to twenty ) can connect to the server and talk to each other. In essence:
1.server creates new client thread for each newly accepted connection
2.if one of these client threads receives some data from the client, then:
3. this client thread creates new ControlThread object (and passes received data to it )
4. ControlThread object in turn spawns a new thread
5. Finally, this spawned thread will send data to all client apps.
I must point out that I could handle some things better using collection classes. But ignoring that, I�m most interested in other design flaws I made. For example:
a) how scalable is this server app?
b) what would you�ve done differently ( in terms of basic program structure )? Perhaps creating ControlThread object each time data needs to be sent to other client apps is a bad idea
c) etc
package serverchat;
import java.net.*;
import java.io.*;
public class Main {
    public static void main(String[] args) {
        Server.runAll();
class Server{
    static int servPort = 1600;
    static ServerSocket servSock;
    static Thread controlThread;
    static ClientHandling[] clientClass=new ClientHandling[20];
    static int numClients = 0;
    static Socket clientSockets[] = new Socket[20];
    static void runAll(){
        initServer();
        handleClient();
    static void initServer(){
        try{
         servSock = new ServerSocket( servPort );  
         catch(Exception e){}
    static void handleClient(){
        try{
            while(true){
              clientSockets[numClients]  = servSock.accept();
              clientClass[numClients] = new ClientHandling(clientSockets[numClients]);
              numClients ++;               
        catch(Exception e){
/*Each time some clientHandling thread receives data from client,
it creates new ControlThread thread. This thread then sends this data
to all clients connected to this server*/
class ControlThread implements Runnable{
    ClientHandling[] clientClass=new ClientHandling[20];
    int numClients;
    String message;
    Thread t;
    ControlThread(String message){
        this.message = message;
        this.numClients = Server.numClients;
        this.clientClass = Server.clientClass;
        t = new Thread(this);
        t.start();
    public void run(){
        System.out.println("ControlThread has started");
               for(int i= 0; i < numClients; i++){
                   if( clientClass[i] !=null ){
                       tellClients(i);
    /* sends data to all the clients. It does this by calling contrToClient()
     on an object that received this data from the client*/
    void tellClients(int i){
           clientClass.contrToClient(message);
class ClientHandling implements Runnable{
Socket clientSocket;
Thread t;
String message;
OutputStreamWriter clientWrite;
InputStreamReader clientRead ;
BufferedReader readBuf;
BufferedWriter writeBuf;
ClientHandling(Socket s){
clientSocket = s;
startThread();
void startThread(){
t = new Thread(this);
t.start();
public void run(){ 
try{        
clientRead = new InputStreamReader (
clientSocket.getInputStream(), "utf-8");
readBuf = new BufferedReader (clientRead);
catch(Exception e){ 
do{   
try{
clientSocket.setSoTimeout(1000);
message = "";
message = readBuf.readLine();
if ( !message.equals("") ){
informContrThread();
System.out.println(message);
catch(Exception e){
}while ( !message.equals("Stop") );
try{
clientSocket.close();
catch(Exception e){
/*this is the actual method that gets called by ControlThread object and
sends received data to all the client apps*/
void contrToClient( String message){
try{
OutputStreamWriter clientWrite = new OutputStreamWriter (
clientSocket.getOutputStream(), "utf-8");
writeBuf = new BufferedWriter (clientWrite);
catch(Exception e){
try{
writeBuf.write(message + System.getProperty("line.separator"));
writeBuf.flush();
catch(Exception e){   
try{
clientSocket.close(); /* I assume I should close the connection
with client if write() throws an exception? */
catch(Exception e1){}
/*creates new ControlThread object, which in turn will
make sure all client apps receive this data*/
void informContrThread(){
System.out.println("informing contrThread");
new ControlThread(message);
thank you                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

1.server creates new client thread for each newly accepted connection Good. Make sure the server doesn't do any I/O in the accepting thread, including even construction of input and output streams.
2.if one of these client threads receives some data from the client, then:
3. this client thread creates new ControlThread object (and passes received data to it )Why? What does the Control thread do that the client thread can't do? Does the client thread really create a new Control thread per piece of received data? What's the purpose of the Control thread here?
4. ControlThread object in turn spawns a new thread Again why?
From your description you appear to be creating:
(a) a thread per connection
(b) a thread per piece of received data
(c) another thread per (b)
What you probably need for a chat server is an input thread and an output thread per connection. The output thread should read a queue and the input thread should write to the appropriate queue(s), making sure you don't create a loop by sending the client's own data back to him.
5. Finally, this spawned thread will send data to all client apps.No. Use one output thread per connection, as described above. As writing to a socket can block, you shouldn't use a single thread for writes to more than one client, otherwise the whole system can stall due to one non-co-operating client.
a) how scalable is this server app?It's about as non-scalable as it could possibly be. You will have an explosion of threads per item of data received if you've described it correctly, and you already have too many threads per connection.
b) what would you�ve done differently ( in terms of basic program structure )?Almost everything: see above.
Perhaps creating ControlThread object each time data needs to be sent to other client apps is a bad ideaMost definitely.

Similar Messages

  • I have an iPhone 6, i bhouth one month ago and Now i Want to talking using the earphone but i cant because the mic is not working, but the earphone is good i used in other iPhone and i got to talk normaly, the problem is on device or configuration

    H

    Hello JD_NINJA,
    Thanks for using Apple Support Communities.
    Error 9006 when restoring your iOS device indicates that there is security software on your computer which is preventing connection to the Apple server or your device.  To troubleshoot this issue please follow the directions below.
    Check your security software
    Related errors: 2, 4, 6, 9, 1611, 9006. Sometimes security software can stop your device from communicating with either the Apple update server or with your device.
    Check your security software and settings to make sure that they aren't blocking a connection to the Apple servers.
    Get help with iOS update and restore errors - Apple Support
    When restoring your iPhone, please make sure to follow the directions in the link below to properly restore.
    Restore your device from an iCloud or iTunes backup - Apple Support
    Take care,
    Alex H.

  • Good or Bad Design

    The following is the design for a reporting module. Any suggestions on the same would be appreciated.
    1) ChartGenerator implements Generator.
    Attributes �
    private int ncompID = UNDEF
         private int njobId = UNDEF
         private String storedproc = ""
         private java.util.Date fromdt = null
         private java.util.Date todt = null
    Methods �
    generateTrendlinevalues(String[] entities2plot)
    generatePieChart(String[] entities2plot)
    generateBarChart(String[] entities2plot)
    generateBarChart(ReportingLabelsAndValues labelvals,
    String[] boards)
    2) GenerateValues implements Generator.
    Attributes �
         private int ncompID = UNDEF;
         private int njobId = UNDEF;
         private Date fromdt = null;
         private Date todt = null;
         private double[] values = null;
         private String[] labels = null;
    Methods �
    public BaseObjectList generateData(String storedproc)
    public String[] getLabels()
    public double[] getValues()
    3) ReportingSource extends baseobject
    Attributes �
    String label
    Double value1
    Methods �
    getSetRepSource()
    4) ReportingSourceDAO extends baseobjectDAO
    5) Servlet � responsible for generating the chart
    Code in the servlet
    GenerateValues gvalues = new GenerateValues(compid, jobId, frmdt,todt);
    ChartGenerator obj = new ChartGenerator(compid, jobId, frmdt, todt, storprocname);
    String[] boards = req.getParameterValues("boards");
    ReportingLabelsAndValues labelvals = obj.generateTrendlinevalues(boards);
    XYChart cxy = obj.generateXYChart(labelvals, boards);
    PieChart cpie = obj.generatePieChart(boards);
    XYChart cbarchart = obj.generateBarChart(labelvals, boards);

    The following is the design for a reporting module.
    Any suggestions on the same would be appreciated.To create reports?
    There are certainly commercial libraries that do this and I believe there is at least one open source one as well, so the first suggestion would be to use one of those instead of creating one.

  • I had a power mac g4 into which i put 3, 320 gb PATA hard drives in a raid slice config so that it worked as one drive needless to sat that i lost the g4 to a surge but the drives are good. now i have an imac, how can i recover the info off those drives

    i had a power mac g4 into which i put 3, 320 gb PATA hard drives in a raid slice config so that it worked as one drive needless to sat that i lost the g4 to a surge but the drives are good. now i have an imac, how can i recover the info off those drives. can i put the drives in external cases and plug them all in, will the imac see them as a raid slice then  help please

    Before you have another accident:
    Buy a UPS of good quality and sufficient to your needs.
    I would have to assume that the drives were connected to a PCI PATA card, hopefully. Otherwise, well RAID and having drives on the same bus (master and slave).
    And no backup, none at all...
    Get your hands on a G4.
    Data Rescue 3 from Prosoft maybe.
    If they were SATA and running on PCI SATA controller, very popular and common really in G4s, more options would be open.

  • Looking for a reading App.  iPad (iOS 7.1.2) - Kindle.  I am looking for a good app that can help a college student with reading books that cannot be found on audio book. Voice over works, but monotone!

    Looking for a reading App.
    iPad (iOS 7.1.2) - Kindle.
    I am looking for a good app that can help a college student with reading books that cannot be found on audio book.  I have tried voice over and it works but it's very monotone and it really strings things together. 
    - I'm willing to pay for a good app but I can't seem to sort though the many that are out there. Any suggestions.

    Ah. I'm surprised, but there we go.
    Have a look here ...
    http://jam.hitsquad.com/vocal/about2136.html
    (courtesy of googling 'OSX free multitrack recording software')
    Didn't have time to do more than skim, but 'Ardour' looked promising. Protools is the only one I've used, the full product is one of the industry standards, but the free 'lite' version listed here seems to be limited to 2 in/out as well.
    Referring to your original post, I'd think trying to write or 'script' something would be a nightmare ... synchronisation of streams within something like Applescript would be a major issue, quite apart from anything else.
    G5 Dual 2.7, MacMini, iMac 700; P4/XP Desk & Lap.   Mac OS X (10.4.8)   mLan:01x/i88x; DP 5.1, Cubase SX3, NI Komplete, Melodyne.

  • My iphone 6 connects to the car via bluetooth, the music works good, but the phone calles does not work.  It looks like it is working but doesn't.  I have tried in my Hyundai and a Dodge rent car and get the same results.  I updated the last 8.0.2.

    My iphone 6 connects to the car via bluetooth, the music works good, but the phone calls does not work.  It looks like it is working but doesn't.  I have tried in my Hyundai Sonata and a Dodge Dart rent car and get the same results.  I updated the last 8.0.2.  It worked the first day i had the phone, and then i updated to Ios 8.0.2 and it quit working.
    Now when i get in the car, it acts like it is connected and makes the same call it was on after syncing to bluetooth, but it really isn't on a call.  This is happening on both cars.
    Does anyone know if this is the phone and i need to take it to Apple or if there is an issue that Apple is working on getting a fix for?
    My son in law has the exact same phone as me, we both got the on 10/6, he had a Dodge Dart and his is working via bluetooth.
    Someone HELP please, as i consider this a safety issue by not having my calls go to bluetooth.

    We had the same problem, but figure out the solution.
    You MUST have at least 1 song added to your ITUNE!  After you add a free song, then everything else should work as normal!
    Hope this helps!

  • I want to sync tasks in Outlook with my iPhone. I have tried Toodledo (not good) and Todo. Todo works, but it cuts off most of the text. I only get the beginning of my (long) lists. Any ideas how I can solve this problem?

    I want to sync tasks in Outlook with my iPhone. I have tried Toodledo (not good) and Todo. Todo works, but it cuts off most of the text. I only get the beginning of my (long) lists. Any ideas how I can solve this problem? I starting to regret that I switched to iPhone...

    Usually if you have some kind of hardware failure there is some beeping during POST or most motherboards now have LED indicators to produce and error message based on the type of failure
    So if its bad memory, not place properly, mismatched, processor not inserted properly, mismatched voltage or voltage connector not present etc it beeps or generates the error id.
    Power supplies can be tested for failure. There are some walk throughs for testing just them with a switch, paperclip or a jumper (I'd suggest not doing this if you are not familiar with the dangers of electricity).
    Memory can be tested with memory diagnostics programs like Memtest+
    Processors can overheat if the proper precautions have not been taken usually you will get a POST beep or error code for that.
    If the motherboard has no response then do the basics first:
    Check power connectors and power supply. Once you determine that is not the case move on to other items like graphics cards in all the way or memory.

  • I have a G4 Quicksilver that no longer works, but the hd may still be good. How can I get files off the G4 hd and onto my new iMac?

    I have a G4 Quicksilver 2001 that no longer works, but the hd may still be good. How can I get files off the G4 hd and onto my new late 2013 iMac?

    Also, how do I boot the G4 into FireWire Target Disk mode?
    First, the G4 must be able to start to use FWTDM. If it can start, hold the t key at boot until you get a "screensaver pattern" that looks like this:
    If the G4 is attached via a FireWire cable to a newer Mac with a FireWire port, the G4's hard drive will appear on the other Mac's desktop just as if it were any external drive. A USB cable won't work for FWTDM.
    Just wondering if the drive in my G4, which I believe may be an ATA drive will also work in an enclosure for a SATA drive?
    No. ATA (actually "PATA" or "IDE") and SATA are different interfaces. PATA external enclosures are now very hard to find. You best and least expensive option is the adaptor that BDAqua linked. One of its connectors is for PATA drives.

  • Good night, do not know what is happening can not buy gold with my visa card for itunes gives me error, but I have money on the card, always worked but this time not accepted!!

    good night, do not know what is happening can not buy gold with my visa card for itunes gives me error, but I have money on the card, always worked but this time not accepted!!

    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • 10.6: Apple and our customers place a high value on simple, refined, creative, well thought through interfaces. They take more work but are worth it. Apple sets a high bar. If your user interface is complex or less than very good it may be rejected

      i am newbie in IOS  i am web developer
    so i use html 5 and i development jquery mobile based application.
    in my application i just call view from web.I used objective c webview .
    but my application rejected  following issues
    - Included low resolution/jagged image/s; see screenshot
    - Portions of your app loaded, refreshed, ran, and/or responded very slowly.
    - Was not optimized to support the device screen size and/or resolution; see screenshot
    - Did not integrate with iOS features.
    they said your app is slow but app speed is good(you can see here : http://teknonova.com/Map)
    they said did not integrate with ios features .yes i just call URL from web view?is it illegal?
    and they gave issues screenshot  there is no problem with screenshot .it is good : (http://a1523.phobos.apple.com/us/r30/Purple/v4/c3/76/8a/c3768ae0-9b41-820f-9315- 40db2afc57b6/temp..gwvpnmiu.png) 
    what should i do?
    should i delete and add new app?

    10.6: Apple and our customers place a high value on simple, refined, creative, well thought through interfaces. They take more work but are worth it. Apple sets a high bar. If your user interface is complex or less than very good it may be rejected
    for this problem what is a good solutions, how need to solve our problem, we need to published our apps. so plez telme the solution for this resons

  • Hey guys, im in need of seriously help. i let a friend jailbreak my iphone and now its jus stuck at the apple screen. i tried rebooting it and everything but nothin is working. does anyone have any good advice?

    hey guys, im in need of seriously help. i let a friend jailbreak my iphone and now its jus stuck at the apple screen. i tried rebooting it and everything but nothin is working. does anyone have any good advice?

    put the phone in DFU mode (do a search for how to do this) and restore to the latest firmware. you may have to download the firmware from apple and when selecting restore or update in itunes press the shift key and select the firmware.
    Hope this helps

  • TS3367 facetime used to work but now does not work on any of my devices

    I have been in regular contact until about 4 days ago using facetime on my iphone 5 imac 10.7.5. ipad 2 now none of these devices work from incoming calls from Philipinnes. Take note the caller had latest macbook pro 13 inch  and is able to call Guam on fatetime with success. What is happening why is incoming calls alway failing. This has been 4 days running and is not good enough. Okay I havent got the latest updates but why in the late few days whould this effect anything. I mean 3 devices and none of them work. This is most frustrating and annoying. I have intead used skype which does work but at night time the camera is not as clear. Tanke note also earlier in the year I received calls from Vietnam and although I did have dropouts was always able to connect only these last four days have had no success. Also I have not been able to call out. The wireless has full bar and am near the modem that is not an issue. Unless there has been a recent change why is htis not working all of a sudden.

    THere seems to be a FaceTime issue and some users who have been in contact with Apple support claim that Apple is working on this.
    I have read many posts on the issue and have seen that there are many reporting that when they have updated their various devices to the latest software, the issue has been resolved.
    You can wait for Apple to resolve the issue OR you can update everything to the latest software and see if this solves your issues.

  • I am having problems connecting to home wifi.  It was working, but now all I get is a blank white screen.  I re-booted with no success.

    I am having problems connecting to home wifi.  It was working, but now all I get is a blank white screen.  I re-booted with no success.

    Hi, blank white screen where exactly?
    Make a New Location, Using network locations in Mac OS X ...
    http://support.apple.com/kb/HT2712
    10.5, 10.6, 10.7 & 10.8…
    System Preferences>Network, top of window>Locations>Edit Locations, little plus icon, give it a name.
    10.5.x/10.6.x/10.7.x/10.8.x instructions...
    System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.
    The interface that connects to the Internet should be dragged to the top of the list.
    If using Wifi/Airport...
    Instead of joining your Network from the list, click the WiFi icon at the top, and click join other network. Fill in everything as needed.
    For 10.5/10.6/10.7/10.8, System Preferences>Network, unlock the lock if need be, highlight the Interface you use to connect to Internet, click on the advanced button, click on the DNS tab, click on the little plus icon, then add these numbers...
    208.67.222.222
    208.67.220.220
    (There may be better or faster DNS numbers in your area, but these should be a good test).
    Click OK.

  • MBP Clamshell Mode - DVI to TV Adapter - Front Row Works - But No Video?

    Hi all,
    Have picked up an Apple DVI to TV adapter for my MB Pro. Have successfully got it to work in clamshell mode displaying Front Row on the TV without the external Mouse or keyboard.
    However, it will not play videos or movies on the TV.
    If I keep the lid open, it will play the video/movie on both displays as hoped. However, when I close the lid, all other Front Row stuff works - but no video picture! Is this some sort of overlay issue? How can I fix this? I do NOt want to burn my LCD when using it this way - would be a waste.
    Please pass on any thoughts!
    Thanks,
    Stu

    I also have this exact same problem. A little annoying since I have just spent $A35 on the mini dvi to dvi adapter and another $A50 on a good quality DVI cable. My LCD tv is set to millions of colors so that is not the issue.
    I have a 2.0Ghz Core2Duo Macbook. A quick google search If anyone knows how to fix it I'd be very grateful.

  • [solved] Owncloud over SSL: http works, but over https only apache

    Hello,
    I try to setup owncloud with SSL.
    Accessing over http works, but over https, I reach the default apache page instead of the owncloud page.
    (I set up SSL according to https://wiki.archlinux.org/index.php/LAMP#SSL )
    How could I make the owncloud site available over https?
    relevant files:
    owncloud.conf:
    <IfModule mod_alias.c>
    Alias /owncloud /usr/share/webapps/owncloud/
    </IfModule>
    <Directory /usr/share/webapps/owncloud/>
    Options FollowSymlinks
    Require all granted
    php_admin_value open_basedir "/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/owncloud/:/etc/webapps/owncloud/:/mt/daten/owncloud/"
    </Directory>
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /usr/share/webapps/owncloud
    ServerName http://example.com/owncloud
    </VirtualHost>
    I tried to change 80 to 443, but then, systemctl restart httpd didn't work. (apache failed)
    httpd.conf:
    # This is the main Apache HTTP server configuration file. It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
    # In particular, see
    # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
    # for a discussion of each configuration directive.
    # Do NOT simply read the instructions in here without understanding
    # what they do. They're here only as hints or reminders. If you are unsure
    # consult the online docs. You have been warned.
    # Configuration and logfile names: If the filenames you specify for many
    # of the server's control files begin with "/" (or "drive:/" for Win32), the
    # server will use that explicit path. If the filenames do *not* begin
    # with "/", the value of ServerRoot is prepended -- so "logs/access_log"
    # with ServerRoot set to "/usr/local/apache2" will be interpreted by the
    # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
    # will be interpreted as '/logs/access_log'.
    # ServerRoot: The top of the directory tree under which the server's
    # configuration, error, and log files are kept.
    # Do not add a slash at the end of the directory path. If you point
    # ServerRoot at a non-local disk, be sure to specify a local disk on the
    # Mutex directive, if file-based mutexes are used. If you wish to share the
    # same ServerRoot for multiple httpd daemons, you will need to change at
    # least PidFile.
    ServerRoot "/etc/httpd"
    # Mutex: Allows you to set the mutex mechanism and mutex file directory
    # for individual mutexes, or change the global defaults
    # Uncomment and change the directory if mutexes are file-based and the default
    # mutex file directory is not on a local disk or is not appropriate for some
    # other reason.
    # Mutex default:/run/httpd
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, instead of the default. See also the <VirtualHost>
    # directive.
    # Change this to Listen on specific IP addresses as shown below to
    # prevent Apache from glomming onto all bound IP addresses.
    #Listen 12.34.56.78:80
    Listen 80
    <IfModule mod_ssl.c>
    Listen 443
    </IfModule>
    # Dynamic Shared Object (DSO) Support
    # To be able to use the functionality of a module which was built as a DSO you
    # have to place corresponding `LoadModule' lines at this location so the
    # directives contained in it are actually available _before_ they are used.
    # Statically compiled modules (those listed by `httpd -l') do not need
    # to be loaded here.
    # Example:
    # LoadModule foo_module modules/mod_foo.so
    LoadModule authn_file_module modules/mod_authn_file.so
    #LoadModule authn_dbm_module modules/mod_authn_dbm.so
    #LoadModule authn_anon_module modules/mod_authn_anon.so
    #LoadModule authn_dbd_module modules/mod_authn_dbd.so
    #LoadModule authn_socache_module modules/mod_authn_socache.so
    LoadModule authn_core_module modules/mod_authn_core.so
    LoadModule authz_host_module modules/mod_authz_host.so
    LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
    LoadModule authz_user_module modules/mod_authz_user.so
    #LoadModule authz_dbm_module modules/mod_authz_dbm.so
    #LoadModule authz_owner_module modules/mod_authz_owner.so
    #LoadModule authz_dbd_module modules/mod_authz_dbd.so
    LoadModule authz_core_module modules/mod_authz_core.so
    #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
    LoadModule access_compat_module modules/mod_access_compat.so
    LoadModule auth_basic_module modules/mod_auth_basic.so
    #LoadModule auth_form_module modules/mod_auth_form.so
    #LoadModule auth_digest_module modules/mod_auth_digest.so
    #LoadModule allowmethods_module modules/mod_allowmethods.so
    #LoadModule file_cache_module modules/mod_file_cache.so
    #LoadModule cache_module modules/mod_cache.so
    #LoadModule cache_disk_module modules/mod_cache_disk.so
    #LoadModule cache_socache_module modules/mod_cache_socache.so
    LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
    #LoadModule socache_dbm_module modules/mod_socache_dbm.so
    #LoadModule socache_memcache_module modules/mod_socache_memcache.so
    #LoadModule watchdog_module modules/mod_watchdog.so
    #LoadModule macro_module modules/mod_macro.so
    #LoadModule dbd_module modules/mod_dbd.so
    #LoadModule dumpio_module modules/mod_dumpio.so
    #LoadModule echo_module modules/mod_echo.so
    #LoadModule buffer_module modules/mod_buffer.so
    #LoadModule data_module modules/mod_data.so
    #LoadModule ratelimit_module modules/mod_ratelimit.so
    LoadModule reqtimeout_module modules/mod_reqtimeout.so
    #LoadModule ext_filter_module modules/mod_ext_filter.so
    #LoadModule request_module modules/mod_request.so
    LoadModule include_module modules/mod_include.so
    LoadModule filter_module modules/mod_filter.so
    #LoadModule reflector_module modules/mod_reflector.so
    #LoadModule substitute_module modules/mod_substitute.so
    #LoadModule sed_module modules/mod_sed.so
    #LoadModule charset_lite_module modules/mod_charset_lite.so
    #LoadModule deflate_module modules/mod_deflate.so
    #LoadModule xml2enc_module modules/mod_xml2enc.so
    #LoadModule proxy_html_module modules/mod_proxy_html.so
    LoadModule mime_module modules/mod_mime.so
    #LoadModule ldap_module modules/mod_ldap.so
    LoadModule log_config_module modules/mod_log_config.so
    #LoadModule log_debug_module modules/mod_log_debug.so
    #LoadModule log_forensic_module modules/mod_log_forensic.so
    #LoadModule logio_module modules/mod_logio.so
    #LoadModule lua_module modules/mod_lua.so
    LoadModule env_module modules/mod_env.so
    #LoadModule mime_magic_module modules/mod_mime_magic.so
    #LoadModule cern_meta_module modules/mod_cern_meta.so
    #LoadModule expires_module modules/mod_expires.so
    LoadModule headers_module modules/mod_headers.so
    #LoadModule ident_module modules/mod_ident.so
    #LoadModule usertrack_module modules/mod_usertrack.so
    #LoadModule unique_id_module modules/mod_unique_id.so
    LoadModule setenvif_module modules/mod_setenvif.so
    LoadModule version_module modules/mod_version.so
    #LoadModule remoteip_module modules/mod_remoteip.so
    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_connect_module modules/mod_proxy_connect.so
    LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
    LoadModule proxy_http_module modules/mod_proxy_http.so
    LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
    LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
    #LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
    LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
    LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
    LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
    LoadModule proxy_express_module modules/mod_proxy_express.so
    #LoadModule session_module modules/mod_session.so
    #LoadModule session_cookie_module modules/mod_session_cookie.so
    #LoadModule session_crypto_module modules/mod_session_crypto.so
    #LoadModule session_dbd_module modules/mod_session_dbd.so
    LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
    #LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
    LoadModule ssl_module modules/mod_ssl.so
    #LoadModule dialup_module modules/mod_dialup.so
    LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
    LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
    LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
    LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
    #LoadModule mpm_event_module modules/mod_mpm_event.so
    LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
    LoadModule unixd_module modules/mod_unixd.so
    #LoadModule heartbeat_module modules/mod_heartbeat.so
    #LoadModule heartmonitor_module modules/mod_heartmonitor.so
    #LoadModule dav_module modules/mod_dav.so
    LoadModule status_module modules/mod_status.so
    LoadModule autoindex_module modules/mod_autoindex.so
    #LoadModule asis_module modules/mod_asis.so
    #LoadModule info_module modules/mod_info.so
    #LoadModule suexec_module modules/mod_suexec.so
    #LoadModule cgid_module modules/mod_cgid.so
    #LoadModule cgi_module modules/mod_cgi.so
    #LoadModule dav_fs_module modules/mod_dav_fs.so
    #LoadModule dav_lock_module modules/mod_dav_lock.so
    #LoadModule vhost_alias_module modules/mod_vhost_alias.so
    LoadModule negotiation_module modules/mod_negotiation.so
    LoadModule dir_module modules/mod_dir.so
    #LoadModule imagemap_module modules/mod_imagemap.so
    #LoadModule actions_module modules/mod_actions.so
    #LoadModule speling_module modules/mod_speling.so
    LoadModule userdir_module modules/mod_userdir.so
    LoadModule alias_module modules/mod_alias.so
    #LoadModule rewrite_module modules/mod_rewrite.so
    #own additions:
    LoadModule php5_module modules/libphp5.so
    <IfModule unixd_module>
    # If you wish httpd to run as a different user or group, you must run
    # httpd as root initially and it will switch.
    # User/Group: The name (or #number) of the user/group to run httpd as.
    # It is usually good practice to create a dedicated user and group for
    # running httpd, as with most system services.
    User http
    Group http
    </IfModule>
    # 'Main' server configuration
    # The directives in this section set up the values used by the 'main'
    # server, which responds to any requests that aren't handled by a
    # <VirtualHost> definition. These values also provide defaults for
    # any <VirtualHost> containers you may define later in the file.
    # All of these directives may appear inside <VirtualHost> containers,
    # in which case these default settings will be overridden for the
    # virtual host being defined.
    # ServerAdmin: Your address, where problems with the server should be
    # e-mailed. This address appears on some server-generated pages, such
    # as error documents. e.g. [email protected]
    ServerAdmin [email protected]
    # ServerName gives the name and port that the server uses to identify itself.
    # This can often be determined automatically, but we recommend you specify
    # it explicitly to prevent problems during startup.
    # If your host doesn't have a registered DNS name, enter its IP address here.
    #ServerName www.example.com:80
    # Deny access to the entirety of your server's filesystem. You must
    # explicitly permit access to web content directories in other
    # <Directory> blocks below.
    <Directory />
    Options FollowSymLinks
    AllowOverride none
    Require all denied
    </Directory>
    # Note that from this point forward you must specifically allow
    # particular features to be enabled - so if something's not working as
    # you might expect, make sure that you have specifically enabled it
    # below.
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    DocumentRoot "/srv/http"
    <Directory "/srv/http">
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    # The Options directive is both complicated and important. Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    Options Indexes FollowSymLinks
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    # AllowOverride FileInfo AuthConfig Limit
    AllowOverride None
    # Controls who can get stuff from this server.
    Require all granted
    </Directory>
    # DirectoryIndex: sets the file that Apache will serve if a directory
    # is requested.
    <IfModule dir_module>
    DirectoryIndex index.html
    </IfModule>
    # The following lines prevent .htaccess and .htpasswd files from being
    # viewed by Web clients.
    <Files ".ht*">
    Require all denied
    </Files>
    # ErrorLog: The location of the error log file.
    # If you do not specify an ErrorLog directive within a <VirtualHost>
    # container, error messages relating to that virtual host will be
    # logged here. If you *do* define an error logfile for a <VirtualHost>
    # container, that host's errors will be logged there and not here.
    ErrorLog "/var/log/httpd/error_log"
    # LogLevel: Control the number of messages logged to the error_log.
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    <IfModule log_config_module>
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
    # You need to enable mod_logio.c to use %I and %O
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here. Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    CustomLog "/var/log/httpd/access_log" common
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #CustomLog "/var/log/httpd/access_log" combined
    </IfModule>
    <IfModule alias_module>
    # Redirect: Allows you to tell clients about documents that used to
    # exist in your server's namespace, but do not anymore. The client
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL. You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client. The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    ScriptAlias /cgi-bin/ "/srv/http/cgi-bin/"
    </IfModule>
    <IfModule cgid_module>
    # ScriptSock: On threaded servers, designate the path to the UNIX
    # socket used to communicate with the CGI daemon of mod_cgid.
    #Scriptsock cgisock
    </IfModule>
    # "/srv/http/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    <Directory "/srv/http/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
    </Directory>
    <IfModule mime_module>
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    TypesConfig conf/mime.types
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #AddType application/x-gzip .tgz
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #AddHandler cgi-script .cgi
    # For type maps (negotiated resources):
    #AddHandler type-map var
    # Filters allow you to process content before it is sent to the client.
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
    </IfModule>
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type. The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    #MIMEMagicFile conf/magic
    # Customizable error responses come in three flavors:
    # 1) plain text 2) local redirects 3) external redirects
    # Some examples:
    #ErrorDocument 500 "The server made a boo boo."
    #ErrorDocument 404 /missing.html
    #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    #ErrorDocument 402 http://www.example.com/subscription_info.html
    # MaxRanges: Maximum number of Ranges in a request before
    # returning the entire resource, or one of the special
    # values 'default', 'none' or 'unlimited'.
    # Default setting is to accept 200 Ranges.
    #MaxRanges unlimited
    # EnableMMAP and EnableSendfile: On systems that support it,
    # memory-mapping or the sendfile syscall may be used to deliver
    # files. This usually improves server performance, but must
    # be turned off when serving from networked-mounted
    # filesystems or if support for these functions is otherwise
    # broken on your system.
    # Defaults: EnableMMAP On, EnableSendfile Off
    #EnableMMAP off
    #EnableSendfile on
    # Supplemental configuration
    # The configuration files in the conf/extra/ directory can be
    # included to add extra features or to modify the default configuration of
    # the server, or you may simply copy their contents here and change as
    # necessary.
    # Server-pool management (MPM specific)
    Include conf/extra/httpd-mpm.conf
    # Multi-language error messages
    Include conf/extra/httpd-multilang-errordoc.conf
    # Fancy directory listings
    Include conf/extra/httpd-autoindex.conf
    # Language settings
    Include conf/extra/httpd-languages.conf
    # User home directories
    Include conf/extra/httpd-userdir.conf
    # Real-time info on requests and configuration
    #Include conf/extra/httpd-info.conf
    # Virtual hosts
    #Include conf/extra/httpd-vhosts.conf
    # Local access to the Apache HTTP Server Manual
    #Include conf/extra/httpd-manual.conf
    # Distributed authoring and versioning (WebDAV)
    #Include conf/extra/httpd-dav.conf
    # Various default settings
    Include conf/extra/httpd-default.conf
    # Include owncloud
    Include /etc/httpd/conf/extra/owncloud.conf
    Include conf/extra/php5_module.conf
    # Configure mod_proxy_html to understand HTML4/XHTML1
    <IfModule proxy_html_module>
    Include conf/extra/proxy-html.conf
    </IfModule>
    # Secure (SSL/TLS) connections
    Include conf/extra/httpd-ssl.conf
    # Note: The following must must be present to support
    # starting without SSL on platforms with no /dev/random equivalent
    # but a statically compiled-in mod_ssl.
    <IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    </IfModule>
    # uncomment out the below to deal with user agents that deliberately
    # violate open standards by misusing DNT (DNT *must* be a specific
    # end-user choice)
    #<IfModule setenvif_module>
    #BrowserMatch "MSIE 10.0;" bad_DNT
    #</IfModule>
    #<IfModule headers_module>
    #RequestHeader unset DNT env=bad_DNT
    #</IfModule>
    thanks!
    Last edited by Carl Karl (2014-05-06 07:40:53)

    OK, solved.
    What I made wrong:
    https://localhost leads to the apache page
    https://localhost/owncloud leads to the owncloud page.
    (Just as an information if there are other apache noobs like me...)

Maybe you are looking for

  • How can I insert an image into a PDF?

    I am using Acrobat 9. I created a document in InDesign and now I want to add an image to the PDF without going back to InDesign. How do I accomplish this without using the Stamp tool. The reason why I do not want to use the stamp tool is because when

  • Http server code 401 reason Unauthorized explanation Unauthorized

    Hello to you all, I have a SRM-XI-SUS scenario and I try to connect to SUS with XI but I am facing the follwoing issue: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!--  Call Adapter   --> - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/M

  • F.38 no records shown

    Hello everyone, I'm trying to run F.38 for tax deferral and it wouldn't pick up any record.  I have tax code V1 configured with target tax code W1 and they both have different g/l account. I gave the tax g/l account for V1 in the F.38 g/l account and

  • Kanban- issue

    Hi All,       Actually My scenario is I configured a setting for some bulk material as kanban material and created a replenishment strategy with control type Direct transfer and issue the cost to the cost center with 201 movement type. I am moving th

  • Postings for Invoice Reversal Without Goods Receipt

    Dear all, I have 2 invoices ( material with moving price) without goods receipt. Invoice 1 The invoice is posted before the goods receipt, therefore the posting to the GR/IR clearing account is based on the invoice price. Invoice quantity * invoice p