Apache :: Getting Subdomain To Accurately Reflect File Hierarchy
May 28, 2014
Apache version 2.4.7
Ubuntu Linux 14.04
BIND version 9.9.5
MySQL version 5.5.37
OpenSSH_6.6.1
Virtualmin version 4.08.gpl GPL
The premise: I am setting up a small, simple torrent tracker front end and back in (xbtit), and it comes with php scripts that should allow me to do a real easy GUI install just by accessing my sub.domain.tld.The story so far: Have a generic "hello world" index.html in my /home/domain/public_html folder, it opens up on browser. I also used virtualmin to create sub.domain.tld, and it made a folder /home/sub/ with public_html and other folders in it.
Inside of /home/sub/public_html I have all the files for xbtit torrent tracker front/back end, and the instructions say that if I now go to sub.domain.tld it will open up the visual web install. When I go to sub.domain.tld it pulls up the generic index.html page that I put in /home/domain/public_html. Why is it pulling up a file that is in an entirely different folder on my server? I'm sure there's just a small change in some configuration file that will tell the server to start reading correctly, and I have been searching, both through virtualmin settings and through online guides to find out what I need to do.
Yesterday I was getting this error, but I think that was before I realized I needed an index.html file in the public_html folder.
ERROR LOG:
H01276: Cannot serve directory /home/maindomain/public_html/: No matching DirectoryIndex (index.html,index.htm,index.php,index.php4,index.php5) found, and server-generated directory index forbidden by Options directive
--
THE PLOT THICKENS
So I just checked my logs, and something very suspicious is going on. I am not doing anything with my server at all right now except loading files to it, and yet all this stuff pops up in the log:
I JUST NOW REALIZED that I used to have hosting with hostgator and ran a really basic forum through my domain. It wasn't password protected and I stopped using it, and the next time I checked on it it had been taken over by spam bots. I thought nothing of it as I wasn't using the forum anymore, and I thought I cancelled my hosting subscription and it would get shut off. I just checked hhostgator though and apparently I forgot to cancel, my account has been being charged every month and is now suspended, BUT as you can see above, there's a lot of bot "cheap nikes" spam stuff showing up in my apache log.
We have many webservers in our environment, Few webservers serves static contents. In one application, we often change the excel file. Every day or 2 days once we will modified the excel sheet content. File name will be the same, only the content will be changed. We will modify the content of the sheet and upload through FTP to the docroot. After we done this if we access the application URL, its displaying the old content. Its takes time to reflect. sometime with in 3 hours sometimes after a day only reflecting. We are not sure what is the issue. we cleared the cache in browser and tried then also its showing the old content. We are using DNS,network load balancer, proxy between the browser and the webserver.
I tired accessing through FQDN, it showed old content, then i accessed through the LB IP it showed the modifed file. For testing i changed the content again and then accessed. This time even for IP it showed old content. Same i tried with the instance 1 IP and Instance 2 IP. On first time it showing properly but after i cahnged the file content and accessed it showing the old file I tried accesing from a different PC where we havent accessed before, there also it showed old content, SO i feel browser cache is not an issue.
We using Source subnet mask IP persistence in load balancer. I am not sure where the old file is cached actually. Will it be cached in Load balancer or proxy or somewhere in webserver. Just we are placing the file in docroot and accessing it in the URL
Can I manage all from one .htaccess file in main root (www) or should I create "esp" directory (and point old subdomain to it - one for every language) and put .htaccess in every directory with redirection ?Â
What kind of addon or software wopuld let me see number of bd connections, cpu usage by process and user and other statistic to manage accurately my reseller account?
i manage linux apache webserver with a few wordpress blogs and from time to time i see someone inject a malicious .php file into wp-content/uploads/2014/10/ directory.
i think its some bad plugin or theme, but these is more blogs, i ugrade, update, WP, but
how can i setup some monitor to tell me which php file (or even line in php file) injected that malicious .php ? I have linux root access so i can setup anythingÂ
The IP addresses assigned to our servers have changed so it's time to update the default SPF information contained in the DNS records for ALL of the domains hosted on our servers:
However, when we update the resource record in the DNS template and then "Apply the changes to all zones...",
Panel will apply changes from the template to all DNS zones including the customized ones. Note that user-modified records always remain intact. For example, if the template contains a new record that was already added by a customer, Panel will keep the customer's record.Click to expand...
index-file.names = ( "index.php", "index.html", "index.htm", "default.htm" ) and my httpd.conf
Code: ProxyRequests Off ProxyPreserveHost On ProxyPass /lighttpd http://0.0.0.0:81/ ProxyPassReverse / http://0.0.0.0:81/ Now when I created a folder on my server's httpdocs /lighttpd/
everything runs smooth so I got the lighty to work for me.
Okay now that i figure it works I wanted to run one of my subdomain on lighty so that I can reduce the load on the server. Does anyone know how I can setup one of my subdomain to open with lighttpd and keep everything else on apache?
I am struggling with this all the day, no answer i found here as well. how to setup proper a subdomain i need. My Apache config has 2 domains configured (on same IP), for the domain2.com i need to setup a sub-domain. Here is what i have so far, but the subdomain keeps redirecting me to domain2.com (main site).
In my computer (Windows 7 Ultimate) I host my sites with Apache 2.2.25 - mod_fcgid-2.3.6-win32-x86 and PHP 5.4.28. In "httpd-vhosts.conf" file from Apache I have my domain set as follows and work fine (http://www.example.com or http://example.com):
But when I tried to access the page: http://www.director.example.com or http://director.example.com, I was redirected to the page http://www.example.com.
I have DNS configured for "example.com" and "director.example.com". This sites is live in another server.
Error.log files for "director.example.com" and Apache is empty. How can I configure the subdomain to work?
I have an ecommerce store. dns at godaddy. A record www points to the 3dr party hosted shopping cart solution on ip a.a.a.a. I also have a blog. A record blog subdomain points to another server b on ip b.b.b.b hosted away from the shopping cart server a completely.
So www goes one place and blog goes to another.The problem is I need to somehow make the blog appear within the main site as URL...blog instead of as a subdomain blog.domain.com.
I cannot access or modify the hosted shopping cart server in any way. I cannot load wordpress there, that is why it is on a completely separate server.I've been told this is perhaps possible with a reverse proxy configuraton on server b where ip b.b.b.b is.So that even though blog. points to server b it can appear that the url is www.mydomain.com/blog and the blog pages off that directory as well.Can this be done via reverse proxy?
Source site is very chaotic (static pages + wp pages) and there are no clear rule for redirection (no regex ).So I need to redirect every single page but syntax:
Redirect 301 esp.site.com/oldpage http:// es.site.com/newpage doesn't work!I think "esp.site.com" in source page is not acceptable syntax..which is the correct syntax ? Can I manage all from one .htaccess file in main root (www) or should I create "esp" directory (and point old subdomain to it - one for every language) and put .htaccess in every directory with redirection ?
Switched from NGINX to Apache2 and now having challenge getting my subdomain s to work properly. Everything worked fine w/ NGINX - so I don't think this is related to my DNS or hosts file setup.
PROBLEM: Calls to dev.domain-name.org are going to www.domain-name.org.
I have tried many different changes to the conf files... NameVirtualHost changes, VirtualHost changes... I can't count how many times I have restarted Apache now.
Here is my setup:
ports.conf ----------- Listen 80 Listen 443 NameVirtualHost 96.126.xxx.xxx:443 (xxx'd out for privacy on forum) NameVirtualHost *:80 within sites-available and activated and linked in sites-enabled:
So here's my situation: I have a rented vent server, that I wanted to point vent.mydomain.com to the IP of said vent server. I put an A record in the dns pointing to the server and all is well. When I type vent.mydomain.com into a browser it take me to the cPanel/WHM page saying "Great Success, Apache is working". Is it possible that I can somehow have that get redirected to the main site or no?
Basically if Im connecting with the vent client, I want it forwarded to the vents IP, otherwise I want to have it redirected to mydomain.com.
I am trying to setup a subdomain and/or virtual host to redirect to a specific port and path. I have setup my server with DDYNS through my domain name registar. Through the ddyns client I have set it to assign a subdomain of "outside.name.com" so that my server will have a easy name to get to instead of a dynamic ip address.
I have also setup on my registrars host records another subdomain of "inside.name.com" with a static IP address for internet network accessing to my server.My problem is that I have a service/program on my server that I need access to both internally and externally and this service can only be access through a port of 32400 and HTTP address of /web. (e.g. outside.name.com:32400/web or inside.name.com:32400/web)...
Is there a way that I can create a VirtualHost or Subdomain of "service.*.name.com" that redirects them to ":32400/web" of the hostname they're on? (e.g. service.outside.name.com automatically forwards or proxies--to keep it pretty--to service.outside.name.com:32400/web)
I am trying to setup a subdomain and/or virtual host to redirect to a specific port and path. I am, however, having great difficulties doing this.
I have setup my server with DDYNS through my domain name registar.
Through the ddyns client I have set it to assign a subdomain of "outside.name.com" so that my server will have a easy name to get to instead of a dynamic ip address.
I have also setup on my registrars host records another subdomain of "inside.name.com" with a static IP address for internet network accessing to my server.
My problem is that I have a service/program on my server that I need access to both internally and externally and this service can only be access through a port of 32400 and HTTP address of /web. (e.g. outside.name.com:32400/web or inside.name.com:32400/web)
This is annoying for others to type out and I am just wanting to make it look pretty. Is there a way that I can create a VirtualHost or Subdomain of "service.*.name.com" that redirects them to ":32400/web" of the hostname they're on? (e.g. service.outside.name.com automatically forwards or proxies--to keep it pretty--to service.outside.name.com:32400/web)
i had been pointing a subdomain.domain.com to the second server IP 111.222.333.444 in first server WHM "Edit DNS Zone", its already 48 hours now
now i can login the ftp subdomain.domain.com, its success to login to the ftp
but its still showing this message when open the subdomain site from browser
Quote:
Great Success ! Apache is working on your cPanelŽ and WHM Server If you can see this page, then the people who manage this server have installed cPanel and WebHost Manager (WHM) which use the Apache Web server software and the Apache Interface to OpenSSL (mod_ssl) successfully. They now have to add content to this directory and replace this placeholder page, or else point the server at their real content.
ATTENTION! If you are seeing this page instead of the site you expected, please contact the administrator of the site involved. (Try sending an email to <webmaster@domain>.) Although this site is running cPanel, WebHost Manager, and Apache software it almost certainly has no other connection to cPanel Inc. or the Apache Group. Please do not send mail about this site or its contents to cPanel Inc. or the Apache Group.
About cPanel: cPanel is a leading provider of software for the webhosting industry. If you would like to learn more about cPanel please visit our website at www.cpanel.net. Please be advised that cPanel Inc. is not a web hosting company, and as such has no control over content found elsewhere on this site.
About Apache HTTP Server: The Apache HTTP Server is an open source web server which powers many of the worlds web sites. The Apache HTTP server is part of the Apache Group's many influential projects. Their efforts have helped shape much the world wide web, and they continue to be a dominating force in the web hosting industry.
i had been pointing a subdomain.domain.com to the second server IP 111.222.333.444 in first server WHM "Edit DNS Zone", its already 48 hours now
now i can login the ftp subdomain.domain.com, its success to login to the ftp
but its still showing this message when open the subdomain site from browser
Quote:
Great Success! Apache is working on your cPanelŽ and WHM Server If you can see this page, then the people who manage this server have installed cPanel and WebHost Manager (WHM) which use the Apache Web server software and the Apache Interface to OpenSSL (mod_ssl) successfully. They now have to add content to this directory and replace this placeholder page, or else point the server at their real content.
ATTENTION! If you are seeing this page instead of the site you expected, please contact the administrator of the site involved. (Try sending an email to <webmaster@domain>.) Although this site is running cPanel, WebHost Manager, and Apache software it almost certainly has no other connection to cPanel Inc. or the Apache Group. Please do not send mail about this site or its contents to cPanel Inc. or the Apache Group.
About cPanel: cPanel is a leading provider of software for the webhosting industry. If you would like to learn more about cPanel please visit our website at www.cpanel.net. Please be advised that cPanel Inc. is not a web hosting company, and as such has no control over content found elsewhere on this site.
About Apache HTTP Server: The Apache HTTP Server is an open source web server which powers many of the worlds web sites. The Apache HTTP server is part of the Apache Group's many influential projects. Their efforts have helped shape much the world wide web, and they continue to be a dominating force in the web hosting industry.
I'm trying to set up Apache on CentOS 4. I'm using Apache 2.0 and it can't seem to access anything outside of the /var/www directory - it gives an Error 403.
I thought this would be down to SELinux but this is disabled. I've run the following command on the directory but with no luck:
I have been battling this for a while. A user will setup a CMS like joomla, e107, etc and every time the CMS changes files either with user interaction on the website or the admin changing things in their cms admin web page, apache takes ownership of the files.
I have tried installing suPHP, FastCGI, and most recently suexec. I am not having any luck with this. I really don't know what I am doing with these recent additions but meanly going on suggestions. Does anyone know of a walk through to fix this permission problem? Anyone with some good advise? Surely not everyone is having to write a script to chown each user's dir and run a cronjob every 5 minutes.
[Wed Jan 30 22:31:33 2008] [error] [client 150.101.99.206] File does not exist: /home/soupnazi/public_html/404.shtml [Wed Jan 30 22:31:33 2008] [error] [client 150.101.99.206] File does not exist: /home/soupnazi/public_html/favicon.ico [Wed Jan 30 22:29:36 2008] [error] [client 150.101.99.206] File does not exist: /home/soupnazi/public_html/404.shtml [Wed Jan 30 22:29:36 2008] [error] [client 150.101.99.206] File does not exist: /home/soupnazi/public_html/favicon.ico [Wed Jan 30 22:27:18 2008] [error] [client 150.101.99.206] File does not exist: /home/soupnazi/public_html/404.shtml [Wed Jan 30 22:27:18 2008] [error] [client 150.101.99.206] File does not exist: /home/soupnazi/public_html/favicon.ico [Wed Jan 30 22:26:48 2008] [error] [client 150.101.99.206] File does not exist: /home/soupnazi/public_html/404.shtml [Wed Jan 30 22:26:48 2008] [error] [client 150.101.99.206] File does not exist: /home/soupnazi/public_html/favicon.ico [Wed Jan 30 22:26:47 2008] [error] [client 150.101.99.206] File does not exist: /home/soupnazi/public_html/500.shtml [Wed Jan 30 22:26:47 2008] [alert] [client 150.101.99.206] /home/soupnazi/public_html/Dolphin/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration [Wed Jan 30 22:20:21 2008] [error] [client 150.101.99.206] File does not exist: /home/soupnazi/public_html/404.shtml [Wed Jan 30 22:20:21 2008] [error] [client 150.101.99.206] File does not exist: /home/soupnazi/public_html/favicon.ico [Wed Jan 30 22:20:19 2008] [error] [client 150.101.99.206] File does not exist: /home/soupnazi/public_html/500.shtml