I am running xampp as an intranet server using 'virtualhost' for 15 'sites' inside our network and things are working fine with 3 exceptions. First problem is my biggest-my 2TB drive is full and I need to add another drive to the server to call up data - how can I do this?
Here are 2 virtual domains from the vhosts file - the 3rd example is what i need to accomplish.
<VirtualHost 172.16.106.162:80>
ServerName clubcal.iserver
ServerAlias www.clubcal.iserver
DocumentRoot "F:/xampp/htdocs/clubcal"
</VirtualHost>
<VirtualHost 172.16.106.163:80>
ServerName digiport.iserver
ServerAlias www.digiport.iserver
DocumentRoot "F:/xampp/htdocs/digiport"
</VirtualHost>
This is an example of what I need to do:
<VirtualHost 172.16.106.164:80>
ServerName tzone.iserver
ServerAlias www.tzone.iserver
DocumentRoot "G:/public_html/tzone"
</VirtualHost>
This xampp server is a separate Windows7 (64bit) system in our network with windows Active Directory resolving DNS issues inside our VLAN (I will downgrade it to 32bit this weekend).
My hosts file resolves ip#'s to domain names in the server, the NIC is assigned with multiple IP #'s so it does work everywhere on our VLAN.
Any insight will be much appreciated.
If you want to sort of "span" the drive, Windows has this handy feature (similar to linux's symlinking) called mklink which you can create a folder in the current directory that is just a symbolic link to the drive. Quick and easy way to span it. I am not sure of any downsides to do doing this, other than if the drive letter changes (if external drive).
That way you should not have to add or change any of your paths in the config etc. Not sure if that is what you were looking for, but hopefully it helps.
Also, did you try your 3rd config you pasted? Did it not work? From what I can see, as long as permissions are fine it should work that way.
Perhaps an issue with permissions in the network?
Not sure if it makes a difference, but maybe worth trying to add this to your 3d cfg:
<Directory "G:/public_html/tzone">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
Related
I've created a blog, it's a homework of my web application class. The teacher asked us to host it. I'm the only one who have decided to host the server at my own PC, which is always switched on.
I'm running this server in Windows 10. I'm using XAMMP.
I've created a domain name at no-ip.com. After hours of fighting against the configurations, I've got the website working in my computer, in my LAN and finally, the whole Internet too.
I know the worst have been over. So it's just a silly thing I want to fix. I have my website inside this directory: C:\xampp\htdocs\wordpress
If I want to access to it, I must write http://IP/DNS.ddns.net/wordpress
I want to get rid of the "/wordpress"
I would like to access to my website with the specific ddns I have created without having to type /wordpress at the end.
I'm sure this have a name but I can't guess it right now, and I don't know how to configure this for Windows 10. I'm still learning it in another subject, but it's for Linux and Windows Server (IIS). The most alike is Linux (Apache) but the files and directories are different.
Can you help me, please? Thanks in advance!
You should set DocumentRoot variable]1 in apache to the proper path.
For example if you have
DocumentRoot "c:/www"
<Directory "c:/www">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
You should edit it to be
DocumentRoot "c:/www/wordpress"
<Directory "c:/www/wordpress">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
And restart apache
I developed an application with laravel and i put it in a local server and i need that other computer access it.
I think that have 2 solutions:
First: Access to laravel server (port 8000)
Second: Put the project in xampp
What is the best solution?
With the first option i can't access and with xampp it doesn't access well to routes and doesn't load the css and js files.
If i access to root folder it list the project folders and i have to go to public folder but doesn't load stylesheet files.
How can i do that?
UPDATE:
I did this steps and this not work yet.
In httpd.conf enable this line Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
Next i add a host in in hosts file:
127.0.0.1 arquivo.localhost
Next i'm going to httpd-vhosts.conf and add this:
<VirtualHost *:8888>
DocumentRoot "/Applications/MAMP/htdocs/arquivo/public"
ServerAdmin arquivo.localhost
<Directory "/Applications/MAMP/htdocs/arquivo/public">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Next i restart the apache and when i try to access to http://arquivo.localhost this give me This site can’t be reached
What i'm doing wrong?
Thank you
create virtualhost under xampp/apache/conf/extra/httpd-vhost.conf
like this
<VirtualHost *:80>
ServerAdmin webmaster#localhost.com
DocumentRoot "C:/xampp/htdocs/laravel/public"
ServerName laravel.localhost
ErrorLog "logs/laravel-error.log"
CustomLog "logs/laravel-access.log" common
</VirtualHost>
and access with http://laravel.localhost/
If its working fine on your localhost, other person can access your site using your Ip address, provided you both are on same local network.
For more you can see this reference : Accessing localhost (xampp) from another computer over LAN network - how to?
I am trying to install two independent, separate CakePHP applications using different databases and domains.
The goal is to be able to access these sites just by typing in the different domain names, i.e. instead of typing localhost/controllerName ideally would be client1/controllerName and client2/controllerName or just anything to differentiate the names and access to the apps.
I am using WAMPSERVER (it is Apache 2.2.17 + mySQL + PHP + phpMyAdmin).
I have already found some tutorials but part of them is just messy, part of them doesn't really refer to my case.
Thanks in advance!
Setup multiple virtual hosts
To do what you ask all you need to do is setup multiple virtual hosts i.e. in your apache config file:
<VirtualHost *:80>
ServerName client1.dev
DocumentRoot /my/apps/are/here/client1/webroot
</VirtualHost>
<VirtualHost *:80>
ServerName client2.dev
DocumentRoot /my/apps/are/here/client2/webroot
</VirtualHost>
You'll also need to edit your hosts file or router so that it contains:
127.0.0.1 client1.dev client2.dev
With that, http://client1.dev and http://client2.dev will both point at your local machine and each domain map to a different application.
maybe this helps:
http://www.dereuromark.de/2011/05/29/working-with-domains-locally/
I use WAMP too
I am currently working on a website where the core of the website is in PHP. I now want to write a bunch of applications on top of that core, and was hoping to do it in Rails. I saw a couple things online where you could set single folders to be handled by PHP, (example: http://macdiggs.com/2007/06/29/using-php-inside-rails-structure-on-apache/) but I am hoping to do the opposite, have single folders that are handled by Rails, and then the rest is handled by PHP. For example, having ourwebsite.com/blog as a Rails app, but ourwebsite.com and ourwebsite.com/internal are all in PHP. What kind of Apache configurations would let this happen?
(As a bonus, my server is managed by Plesk, so I am concerned about making straight changes to the apache configuration. I have root access, so I can do it, but I am worried that Plesk might get mad)
EDIT: I should also mention, I am using Subdomains as part of my application, so I would really prefer to have something like ourwebsite.com/rails_app. If that is the only option, I can go that route, but I would prefer not to.
If you want the PHP app to be default application and only use Rails for a subdirectory, this Apache configuration should work for you:
DocumentRoot "/path/to/your/php/app/html"
ProxyPass /some_resource http://127.0.0.1:3000/some_resource
Note that your rails application would be running on port 3000 and you will need the ProxyPass Apache module installed.
I am working on a project and its having some blog in php ie wordpress and application in rails. Just configured it an hour before. Might help you.
<VirtualHost *:80>
ServerName abc.com
DocumentRoot /home/me/apps/my_rails_app/current/public
</VirtualHost>
<VirtualHost *:80>
ServerName blog.abc.com
DocumentRoot /home/me/apps/abc/wordpress
<Directory "/home/me/apps/abc/wordpress">
Options +Indexes FollowSymLinks
AllowOverride All
Allow from all
Order allow,deny
</Directory>
</VirtualHost>
I have a Zend Framework project on a local machine, and as recommended its /public subfolder is made a DocumentRoot in httpd.conf. So I access this app simply with http://localhost.
This new requirement makes me unable to access other
web apps in a former webserver root (which contains a few regular php apps and a couple of zend framework apps).
What configuration should I choose to be able to simultaneously access both ZF root-based apps and other apps like PHPMYADMIN?
You'll probably need to use some kind of VirtualHost
You have at least two solutions :
VirtualHosts based on diferent port numbers
For instance, you'd have one site on http://localhost/ (ie, default port = 80)
And another one on http://localhost:8001/
And another one on http://localhost:8802/
And so on
VirtualHosts based on different domain-names
For instance, you'd have on site on http://localhost/
And another one on http://mytestwebsite/
In the second case (the solution I always use), you will have to edit your "hosts" file, so "mytestwebsite" is an alias to your local machine -- which IP address is 127.0.0.1
Under windows, this file is located in C:\WINDOWS\system32\drivers\etc
On Linux, it's in /etc/
You'd have to add a line like these ones :
127.0.0.1 localhost
127.0.0.1 mytestwebsite
Then, in the Apache configuration, you need to create one VirtualHost per site. Something like this, I suppose :
<VirtualHost *>
ServerName mytestwebsite
DocumentRoot /home/squale/developpement/tests
<Directory /home/squale/developpement/tests>
Options Indexes FollowSymLinks MultiViews +SymLinksIfOwnerMatch
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *>
ServerName myothertestwebsite
DocumentRoot /.../myothertestwebsite
<Directory /.../myothertestwebsite>
Options Indexes FollowSymLinks MultiViews +SymLinksIfOwnerMatch
AllowOverride All
</Directory>
</VirtualHost>
(Needs tunning / configuration, of course)
And you'll also probably need some directive like this one :
NameVirtualHost *
Well, this might not be the entire solution (that one depends on your server / applications) ; but I hope these few pointers will help you get to it !
If you need more help, the keyword is "VirtualHost" ;-)
Have fun !
Zend Framework probably uses a .htaccess file. If so, you might use that to add rules to leave the other apps alone. Another option is to use subdomain (eg phpmyadmin.localhost)