Ubuntu Servers :: Apache2-svn Mime - Tell Apache To Treat Script Files As Plain-text?
Apr 5, 2010
I've got an apache-svn server up and running fine but I'm struggling with an irritating problem. I need the apache server to display .vbs, .cs., vb., .sh, .pl., .c, .h, .cpp, etc, etc files in the browser. Whenever our users click on a script they get a download dialog instead of the script being displayed in the browser as plain/text. I have added:
Code: AddType text/plain .vbs Into /etc/apache2/mods-enabled/mime.conf but it seems to be getting ignored. how I can tell apache to treat script files as plain-text?
View 1 Replies
ADVERTISEMENT
Jan 31, 2011
I'm trying to run a CGI file with Apache2, but when I navigate to it, I just get the file in it's plain text format and not actually parsing the file. What do I need to configure?
I've tried this Code: <Directory /var/www/>
AddHandler cgi-script *.cgi
Options +ExecCGI
</Directory> And I've tried this Code: <Directory /var/www/>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
[Code]...
View 1 Replies
View Related
Apr 14, 2011
I somehow managed to screw up my lucid lynx system so that all files show up under Nautilus properties as Type Plain Text. When I double click a file, any file, the system tries to open it as plain text with gedit. Everything worked correctly until yesterday when I tried to install a new version of PyQt4. If I reboot with an old (karmic) version of Ubuntu and bring up Nautilus Properties on the same file (my data partition can be opened in other OS's) the files show up with the correct file type (PDF, ODT, etc) So the problem is not in the file itself, but rather in the lucid OS, which is mis-interpreting the file type. As I said I somehow messed it up when installing the new version of PyQt4.
View 7 Replies
View Related
May 1, 2010
I need to know how to install php when apache is in /usr/local/apache2
View 6 Replies
View Related
Apr 2, 2011
I put a text file on my desktop and added a couple lines of text with gedit. File type shows text/plain. Double-click opens the file in gedit which is what I want. I'm using the file to temporarily hold some snips of code that I copy from file to file, but when I copy some html into the file and save it, now file properties show it's text/html and a double-click opens the file in firefox, which isn't what I want. Is there some way to keep the file type from changing itself?
View 6 Replies
View Related
Mar 29, 2010
I can't get my apache2 log files to rotate on an Ubuntu 8.04 64-bit server install.
Does anybody know of logrotate creates an error log somewhere by default?
Here's my /etc/logrotate.d/apache2 file if someone has any insight if I am doing something wrong.
/var/log/apache2/*.log /var/log/apache2/portal/*.log {
weekly
missingok
rotate 52
nocompress
[Code].....
View 9 Replies
View Related
May 5, 2010
I have apache2 installed along with php5 and mysql5.0. I have installed them by themselves along with just installing the full LAMP install through terminal. My problem is that I cannot parse php files, it will just download them instead. I did change my apache server to nick/projects (nick is my username). If I navigate to localhost/index.html it works fine but will not parse the php files I have put there. I also have rails working fine in that folder too using apache2.
View 7 Replies
View Related
Jan 28, 2010
I'm trying on getting the MIME types setup correctly for Apache/MediaWiki. I think I've modified every config file known to man to no avail. Here's some info on what I've got going on. I'm trying to get the Office 2007 MIME types configured for MediaWiki 1.14 so that we can upload/download the files. Out of frustration/lack of need I went the less secure route and I modified the LocalSettings.php config file to disable MIME type verification for uploads.
Code:
$wgVerifyMimeType = false;
This works great for the uploads, and I can upload .DOCX, .XLSX, and .PPTX all day long, however when downloading them, they download as a .ZIP file with all the XML info inside of it. No biggie for me personally as I can just rename .ZIP to .DOCX and it works fine, however for the average user it's not going to fly. So, I figured that MIME types would be the source of my pain and started doing some research.
I have modified the following config files to include the MIME types listed below.
/etc/mime.types
/var/www/.htaccess (created to try and force them)
/var/www/mediawiki-1.14.0/.htaccess (created to try and force them)
/var/www/mediawiki-1.14.0/includes/mime.types
Code:
application/vnd.ms-word.document.macroEnabled.12 .docm
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
application/vnd.ms-powerpoint.template.macroEnabled.12 potm
application/vnd.openxmlformats-officedocument.presentationml.template potx
application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/vnd.ms-excel.addin.macroEnabled.12 xlam
application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
application/vnd.ms-excel.template.macroEnabled.12 xltm
application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
It doesn't seem to matter where I put the code, I can't get the MIME types to register with Apache/MediaWiki.
View 1 Replies
View Related
Jan 7, 2010
I've been using openoffice.org a lot recently and I was hoping that I'd be able to cat the contents of the file solely through the terminal.What's the best way to do this? My thought is to use a command in a terminal to convert to plain text and cat the file.
View 2 Replies
View Related
Jan 16, 2010
With the gpg command I used to encrypt files so they saved as plain text (the encrypted files were viewable in a plain text editor though were a encrypted nightmare)
I just forget the option in the gpg command to do this and I can't find it in a hurry either in the man file
View 6 Replies
View Related
Nov 12, 2010
I have installed LAMP server, I cant access any image files though Apache2.
All other, text document are showing, html, and php etc.
View 1 Replies
View Related
Jan 14, 2010
Does anyone know of a application that will use plain text, but allows the customizatino of width and lenth of the number of characters?
Looking to set my footprint to be 78 characters wide (by) 59 characters high.
View 2 Replies
View Related
Mar 5, 2011
Apache 2.2 on Slackware 13.1 seems to be missing the MIME icons when i visit a directory containing files.
This command returned nothing related to httpd
Code:
find | grep /icons
Where do i find the icons and how do i enable them ?
View 2 Replies
View Related
Jul 15, 2010
Basically, I have a selection of .rdp shortcuts to various machines, but they are considered the file type "plain text document (text/plain)" so if I change it to open with to tsclient, all of that file type opens with tsclient. And if I change it to gedit, all the rdp files open with gedit. Is there a way to create a custom file type dependent on the extension rdp, or is there a way to set tsclient to open by extension rather than filetype?
View 2 Replies
View Related
Jul 27, 2010
I am looking for some source package which will convert html fileto text file without using perl.I mainly need to do this on an ARM platform, so if I get sources I can cross compile it. I need the source package in C
View 4 Replies
View Related
Apr 14, 2010
i have a big file of random numbers i generated at some point in time, after working with it with different things(how fun that was)... i want to remove duplicate lines and i'm not sure i'm doing this right
heres the command
Code:
sort random.txt | uniq -u > rand-shorter.txt
the file is pretty big, everything on a new line. i found the command on a web site so i'm sure its correct(bit of a command line in linux newbie)
can anyone confirm if this will remove lines duplicate lines (keeping one copy) and dump what is left in a file named rand-shorter.txt?
EDIT: i think its actually working, just taking a reallllly long time (on an old pen 4 from 2000)
View 8 Replies
View Related
Sep 27, 2010
When I print receipts from certain company's emails, they span three pages or more bloated with images, links and overly large text. I can view the message in plain text by setting the preferences to only display text instead of html, but it doesn't affect what is printed. I still get the full HTML page printed. Is there a way to force evolution to print in plain text instead of HTML?
View 3 Replies
View Related
Sep 16, 2009
My code perl code is as below.I want to print the contents of file "/dir/Myfile".But problem is that the file "Myfile" contains html content as below.
<TP_INFO> <Mail> </Mail> </TP_INFO>
So the IE treats it as HTML content and doesnt print the content present in the tags.Can any one help me to print HTML content as plain text?
sub PrintLog
{
print "Content-Type: text/plain
";
[code]....
View 4 Replies
View Related
Mar 21, 2010
I just downloaded a Plain Text File that contains (what appears to me as) code that will 'unlock' functions of my MS keyboard, now what do I do with it? Here is a preview of some of the contents of the file from the beginning of the text.
[Code]....
.....and so on with different items. My goal in doing this was to enable the zoom button on the keyboard.
View 1 Replies
View Related
Nov 27, 2010
I'm having a very strange problem with my ubuntu apache2 server running wordpress. i want do download media files (from within a flash-mp3-player onsite or by link [url]) but the file transfer just stops after a while. (at least sometimes) at random positions. after that i have to clear the browsers cache and try again.
It is really annoying, though it is my band's website and we want to share our songs with our friends. i checked from several clients, seems to happen everywhere (linux, mac or windows clients)
The system:
Code:
With wget it seems to work...
View 4 Replies
View Related
Jul 31, 2010
Linux kernel 2.6.21.5, Slackware 12.0.
I would like to know if it would be easy for me to get a program which, given a plain text file as input, discards the line separators and writes the rest as its output. And let's put in the case of a file that has been mangled to the point of having CR,LF (carriage return, line feed) in some places, only CR in others, and only LF in still other places. That is, the three possible combinations used in systems as a newline char (the 1st is, or was used by m$- dos, the 3rd one by Unix and I know systems where CR is the line terminator).
After all, all the program has to do is, every time it finds a char belonging to the set {CR, LF}, cast it away.
View 11 Replies
View Related
Jun 15, 2010
I was wondering if there is way to hide passwords in bash scripts. For example: I have to write a script to export a full ldap structure, and I'm using the ldapsearch -y passwordfile, where password file is a plain text file that contains the password. Is there a way to hide the password from that file?
I was thinking to remove the r attribute from the file and before the script is lunched to put the attribute back, but is not a good solution, the same with immutable attribute.
View 7 Replies
View Related
Jan 4, 2010
Is there anyway to decrypt some plain text which was encrypted using the function crypt()?
View 3 Replies
View Related
Jul 24, 2009
I dont have permisions to edit plain text file.
When I run:
View 2 Replies
View Related
Sep 5, 2011
Since we switched our server to Squeeze, I'm receiving emails from the cron about a mysql error (...can't use locks with log tables). But this is not the issue I want to talk about here. The issue is that since the executed command is: /usr/bin/mysqlcheck -uroot -pmypassword --all-databases --check-only-changed --silent which is a command that was automatically added to the cron by the mysql package (I believe), the password is sent in clear text in the email's subject. In my sense, this is a serious security issue (sending root password in email subject...)
I don't know at what level it should be corrected, but it seems to me like it should be corrected in the Debian distrib, shouldn't it ?
And for now, how can I hide the password in the emails I receive ?
View 1 Replies
View Related
Apr 23, 2010
Is it possible to have the passwd file for svnserve encrypted, rather than store the usernames/passwords in plain text?
View 3 Replies
View Related
Dec 23, 2010
I have set up a very basic apache server to host my own website (have not set up sql or database or php yet) and I am trying to find out how to fpt or copy my website. I am creating the site in windows and need to know how to transfer it to the server, preferably into the /var/www folder directly.
View 7 Replies
View Related
Aug 26, 2010
I seem to be unable to use the html
Code:
include virtual="test.txt" I have tried following the advice in this thread http://ubuntuforums.org/showthread.php?t=1510098 but it makes no difference. The file is there, but the line is delivered to the browser as-is. Using Lucid and a new install of apache 2.2 from the repository.
View 7 Replies
View Related
Mar 5, 2011
Me and 2 others are working on a website (Bob, Mike, and Joe). We made a group called developers and each of us are in the developers group. The Apache server runs as www-data. When we upload files, the file owner is the users name and the group is "developers".
/etc/group has the following
Code:
www-data:x:33:
bob:x:1000:
mike:x:1001:
[Code]....
I have always just set everything to 775 and just called it good. Well I don't want to wake up to a Russian political message plastered all over the site. It's time I do things properly.
View 3 Replies
View Related
May 10, 2011
My apache ignores index files (index.php ,index.html ,index.htm , ...) and while these files exists in directory apache lists directory content!I mean http://localhost/test/ lists directory content instead of showing index.php!
View 9 Replies
View Related